【问题标题】:Check if column is indexed检查列是否被索引
【发布时间】:2013-08-23 16:29:42
【问题描述】:

SSMS 中有没有办法检查列是否被索引?

我问的原因是因为我正在考虑将varchar(500) 更改为varchar(MAX) 并已阅读如果该列被索引,那么您不能插入大于900b 的数据。我想确保这不会成为问题。

【问题讨论】:

标签: sql ssms varchar ssms-2012


【解决方案1】:
USE database;
EXEC sp_helpindex 'yourTable';

【讨论】:

  • 上面写着:Msg 1018, Level 15, State 1, Line 1 Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-11-03
  • 2011-05-22
  • 2021-07-22
  • 2013-03-19
  • 1970-01-01
  • 1970-01-01
  • 2015-11-03
相关资源
最近更新 更多