- SELECT
- C.name as [字段名],T.name as [字段类型]
- ,convert(bit,C.IsNullable) as [可否为空]
- ,convert(bit,case when exists(SELECT 1 FROM sysobjects where xtype='PK' and parent_obj=c.id and name in (
- SELECT name FROM sysindexes WHERE indid in(
- SELECT indid FROM sysindexkeys WHERE id = c.id AND colid=c.colid)))
sql工具:一条sql语句,查询sql server某个指定表的所有列及其属性
最新推荐文章于 2021-01-23 04:47:43 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)