爱子日志

SQL Server在DELETE语句中使用INDEX HINT

SQL Server用hint,在select语句:

select * from tablename with(index(indexname)) where...


可在delete中报错

delete from tablename with(index(indexname)) where ...


Google了很久终于找到一篇:

http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/32121714-97d8-4c92-8214-ecea4e7dc76a


原来要用

delete tablename from tablename with(index(indexname)) where ...

转载自:http://www.cnblogs.com/amonw/archive/2013/03/28/2987867.html

聚划算