SELECT /*+ index(TB_ALIAS IX_G_COST3) */­
TB_ALIAS.*­
FROM g_Cost TB_ALIAS­
WHERE Item_Two = 0­
AND Flight_Date >= To_Date('20061201', 'YYYYMMDD')­
AND Flight_Date <= To_Date('20061231', 'YYYYMMDD');­
­
刪除時(shí)也可以指定使用索引的寫(xiě)法。­
­
DELETE /*+ index(TB_ALIAS IX_G_COST1) */­
FROM g_Cost TB_ALIAS­
WHERE ITEM_NAME = '小時(shí)費(fèi)';­
­
IX_G_COST1,IX_G_COST3都是表G_COST的索引。
更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄