先写结论:  

语法:  DROP INDEX 表名.索引名

如果索引明明存在..却报标题上那个错..请直接去看是否是表名与库中的不一样.. 请一定去检查一下..别问我为什么这么说..

  

if exists(select * from sysindexes where id=object_id('table_1') and name='Index_table_1_id')
  begin 
    drop index table_1.Index_table_1_id;
  end
create index Index_table_1_id on table_1(id)

 

用在大量更新前删除现有索引..更新完成后重新建立..

相关文章:

  • 2021-12-07
  • 2021-11-27
  • 2021-05-17
  • 2021-09-19
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-18
  • 2021-12-18
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案