使用SQL查看表字段和字段说明


MySql:

show full columns from tableName;

Sql server:

SELECT A.name AS table_name, B.name AS column_name, C.value AS column_description
FROM sys.tables AS A INNER JOIN
sys.columns AS B ON B.object_id = A.object_id LEFT OUTER JOIN
sys.extended_properties AS C ON C.major_id = B.object_id AND C.minor_id = B.column_id
WHERE (A.name = '表名')

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM