查询表的脚本
SELECT C.column_id AS 序号,C.[name] AS 列名,S.[name] AS 类型,C.max_length AS 长度,C.scale AS 精度,P.[value] AS 字段描述,C.collation_name as 排序规则 FROM SYS.tables AS T INNER JOIN SYS.columns AS C ON T.object_id=C.object_id INNER JOIN SYS.TYPES AS S ON C.user_type_id=S.user_type_id left join sys.extended_properties P ON P.major_id=T.[object_id] AND P.minor_id=C.column_id WHERE T.[name]='TA_WEBUserRegist' AND P.[name]='MS_Description';