根据数据库表名查询该表字段名、字段类型、以及注释

select
c.name as column_name,t.name as data_type,
(select value from sys.extended_properties as ex where ex.major_id = c.object_id and ex.minor_id = c.column_id) as notes
from
 sys.columns as c inner join sys.tables as ta on c.object_id=ta.object_id inner join 
(select name,system_type_id from sys.types where name<>'sysname') as t on c.system_type_id=t.system_type_id
where  ta.name='PE_Address' order by c.column_id

 

'PE_Address' 为要查询的数据表名;

 

根据数据库表名查询该表字段名、字段类型、以及注释

上一篇:Oracle RAC FailOver配置


下一篇:Nginx(三):nginx.conf配置文件说明 【2】 文件结构和配置高亮