Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有一个 SQL 命令可以仅显示用户创建的表并排除 MySQL 数据库中默认存在的表?
这大约总结了它:
select * from information_schema.tables where table_schema not in ('information_schema', 'mysql', 'performance_schema')
information_schema包含有关您的数据库的元信息。您可以使用 列出所有表information_schema.tables。如果排除两个元模式information_schema和mysql,您将获得所有用户表
information_schema
information_schema.tables
mysql