如何在sqlserver中查找某个表所有字段值

如题所述

查询 MySql 数据库中所有表名:

select table_name from information_schema.tables where table_schema='当前数据库名' and table_type='base table';

查询 MySql 指定数据库中指定表的所有字段名:

select column_name from information_schema.columns where table_schema='当前数据库名' and table_name='指定的表名';

扩展资料

查询所有数据库

show databases;

查询指定数据库中所有表名

select table_name from information_schema.tables where table_schema='database_name' and table_type='base table';

查询指定表中的所有字段名

查询指定表中的所有字段名和字段类型

select column_name,data_type from information_schema.columns where table_schema='database_name' and table_name='table_name';

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网