SELECT c.name,t.name TYPE,c.max_length,c.precision,c.scale,p.value FROM sys.extended_properties p INNER JOIN sys.columns c ON p.major_id=c.object_id AND p.minor_id=c.column_id INNER JOIN sys.sysobjects o ON c.object_id=o.id INNER JOIN sys.systypes t ON t.xtype=c.system_type_id WHERE o.name=‘表名‘
说明:我用的是sql server 2008
时间: 2024-10-17 17:41:09