开发者

Show only user created tables in MySQL?

开发者 https://www.devze.com 2023-03-05 10:41 出处:网络
Is there a SQL command by which I can display only the tables created by users and excluding those present by defau开发者_运维百科lt in the MySQL database?This about wraps it up:

Is there a SQL command by which I can display only the tables created by users and excluding those present by defau开发者_运维百科lt in the MySQL database?


This about wraps it up:

select * from information_schema.tables 
where table_schema not in ('information_schema', 'mysql', 'performance_schema')

The information_schema contains meta-information about your database. You can list all tables using information_schema.tables. If you exclude the two meta-schemas information_schema, and mysql, you'll get all user-tables

0

精彩评论

暂无评论...
验证码 换一张
取 消