当您想要导出数据字典、
正确的按钮、新的
查询时,
执行以下代码
复制代码代码如下所示:
选择
(当a.colorder = 1然后d.name别的' '结束)表名,d.xtype表式,
的a.colorder场序列号,
该a.name字段的名称,
(当columnproperty(张,a.name,'isidentity)= 1然后''else端的刻度),
(当选择计数(*)时)
从中
(姓名)
(选择的
名字 从sysindexes
在(ID =张)和(indid在)
(选择indid
从sysindexkeys
在(ID =张)和(给的)
(选择给
从列
),(ID =张)和(name = a.name )))))和
(xtype = 'pk '))> 0 ' '其他'端)初生根,
b.name型,
a.length占用的字节数,
columnproperty(张,a.name,'precision)作为长度,
Isnull(columnproperty(张,a.name,规模),0)为十进制数字,
(当a.isnullable = 1 then'else '结束'滴答)允许空,
Isnull(e.text,'')的
默认值,
Isnull(G. {value},)作为字段描述
从B列加入systypes中存在左
在a.xtype = b.xusertype
内部联接中D
在张= d.id和d.xtype在(U,V)和d.name <> 'dtproperties
左
连接syscomments E
在a.cdefault = e.id
左连接sys.extended_properties G
在张g.major_id和g.major_id a.colid = =
以张,a.colorder