查询数据库表字段名和字段类型等信息

mysql

select * from information_schema.columns where table_name = '表名'  and TABLE_SCHEMA='数据库名'

sql server

select *  from information_schema.columns where table_name = '表名'  and TABLE_CATALOG='数据库名'

oracle

select * from user_tab_columns  where table_name = upper('表名')

 

posted @ 2021-01-12 15:04  工具人的自觉  阅读(337)  评论(0编辑  收藏  举报