当前位置: 代码迷 >> Sql Server >> 怎么用t-sql改名索引,及怎么命名索引才比较科学
  详细解决方案

怎么用t-sql改名索引,及怎么命名索引才比较科学

热度:18   发布时间:2016-04-27 16:42:45.0
如何用t-sql改名索引,及如何命名索引才比较科学。
IX_T_Dic_App
PK_T_Dic_App
_WA_Sys_ParentClass_3449B6E4

我发现我的所有表中大致有3中类似这样的的索引。

我想把他们的名字都规范一下。不知道怎么做。


------解决方案--------------------
create table ta(
id char(10) not null constraint PK_ta primary key nonclustered--pk_ta为索引名
)

create index IX_ta on dbo.ta(列名)--IX_ta 为索引名
  相关解决方案