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');­
­
删除时也可以指定使用索引的写法。­
­
DELETE /*+ index(TB_ALIAS IX_G_COST1) */­
FROM g_Cost TB_ALIAS­
WHERE ITEM_NAME = '小时费';­
­
IX_G_COST1,IX_G_COST3都是表G_COST的索引。
更多信息请查看IT技术专栏