使用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 = '表名')

 

posted @ 2018-07-11 13:28  Eric-Lee  阅读(12688)  评论(0编辑  收藏  举报