怎么查看mysql数据库中所有表名

查询 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=...
怎么查看mysql数据库中所有表名
查询 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';
2023-05-01
mengvlog 阅读 156 次 更新于 2025-10-29 16:03:32 我来答关注问题0
檬味博客在线解答立即免费咨询

mySQL相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部