ORACLE查询或删除时指定使用索引的写法­
2014-08-25来源:易贤网

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');&shy;

&shy;

删除时也可以指定使用索引的写法。&shy;

&shy;

DELETE /*+ index(TB_ALIAS IX_G_COST1) */&shy;

FROM g_Cost TB_ALIAS&shy;

WHERE ITEM_NAME = '小时费';&shy;

&shy;

IX_G_COST1,IX_G_COST3都是表G_COST的索引。

更多信息请查看IT技术专栏

推荐信息