查询某库某表表的字段信息

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012269637/article/details/86488838

不加上某库,查询出来的列可能是多库的

select * from information_schema.columns where  table_name = 'security_user_occupationalhistory'; 

select TABLE_NAME,COLUMN_NAME,COLUMN_TYPE,COLUMN_COMMENT from information_schema.columns where table_schema ='yuncai'  and table_name = 'security_user_educationbackground';
select TABLE_NAME,COLUMN_NAME,COLUMN_TYPE,COLUMN_COMMENT from information_schema.columns where table_schema ='yuncai'  and table_name = 'security_user_essentialinfo';
select TABLE_NAME,COLUMN_NAME,COLUMN_TYPE,COLUMN_COMMENT from information_schema.columns where table_schema ='yuncai'  and table_name = 'security_user_immediatefamily';
select TABLE_NAME,COLUMN_NAME,COLUMN_TYPE,COLUMN_COMMENT from information_schema.columns where table_schema ='yuncai'  and table_name = 'security_user_occupationalhistory';

猜你喜欢

转载自blog.csdn.net/u012269637/article/details/86488838
今日推荐