系统表sysindexes中的status对应的解释???

gjpfly 2003-02-17 12:37:27
有没知道系统表sysindexes中的status对应的解释???
case when i.status = 0 then '普通索引'
when i.status = 2 then '唯一索引'
when i.status = 16 then '聚簇索引'
when i.status = 2048 then '主键索引'
when i.status = 2050 then '主键唯一索引'
when i.status = 16402 then '聚簇唯一索引'
when i.status = 2097152 then '有字段允许为空的普通索引'
when i.status = 2097154 then '有字段允许为空的唯一索引'
else convert(varchar(20),i.status) end
但是还有其它不知道的类型,哪位大虾有相应的资料,请帮忙啦?
比如:18,2113554,16403,8388704,10485856,18450等???
...全文
262 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
愉快的登山者 2003-02-17
  • 打赏
  • 举报
回复
18,2113554,16403,8388704,10485856,18450等应该是几种状态的组合。
如:18是16和2。
愉快的登山者 2003-02-17
  • 打赏
  • 举报
回复
status int Internal system-status information:
1 = Cancel command if attempt to insert
duplicate key.
2 = Unique index.
4 = Cancel command if attempt to insert
duplicate row.
16 = Clustered index.
64 = Index allows duplicate rows.
2048 = Index used to enforce PRIMARY KEY
constraint.
4096 = Index used to enforce UNIQUE constraint.
gjpfly 2003-02-17
  • 打赏
  • 举报
回复
不是,16和2的组合是16402,你们自己可以试一下啦?

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧