查询 数据库所有表及注释

MySQL:

select table_name as 表名,table_comment as 注释
   from information_schema.tables

MsSQL:

select c.name as 表名,a.value as 注释
    from sys.extended_properties a
    join (
        select distinct id
            from syscolumns
    )b on a.major_id=b.id
    join sysobjects c on b.id=c.id
    where a.minor_id=0

猜你喜欢

转载自www.cnblogs.com/Bingo1363136101/p/12891003.html