select table_name from informatin_schema.tables
where table_schema='information_schema';
查询表
select column_name from information_schema.columns
where table_schema='information_schema'
and table_name='character_sets';
31.2 information_schema vers show
1.information_schema相比show的优势:
1.information_schema是标准SQL的特征,然而Showm是一个MySQL-specific语句
2.使用Information——schema,你总说能够使用SELECT语法获取元数据,无需考虑信息的类型。
3.使用select和information_schema,你可以由完整的灵活选择获取什么。
4.因为在Information_schema的信息能够获取使用灵活的select,你能够使用joins,unions和子查询
5.可以使用create table....selcet or insert ...select,这INFORMATION_SCHEMA的内容能够获取和存储到其他的表使用。
show的优势:
1.show 是一个表可以使用随MySQL的发布
2.show总是更加准确的
31.3 INFORMATION_SCHEMA的限制
show varivles
show status
show engiens
show processlist
show master status 和 show slave status提供关副本服务器的信息。
Information_schema与SHOW的区别
本文对比了使用Information_schema和SHOW语句查询数据库元数据的方法。Information_schema提供了更灵活的查询方式,支持JOIN、UNION等操作;而SHOW则在准确性上更具优势。此外,文章还列举了一些SHOW命令无法实现的功能。
2278

被折叠的 条评论
为什么被折叠?



