mysql 知道表名怎么去查找在那个数据库?

# mysql 查找某个表在哪个库

SELECT table_schema FROM information_schema.TABLES WHERE table_name = '表名'

例如:
SELECT table_schema FROM information_schema.TABLES WHERE table_name = 'organization_info';

 

 因为这两个库都有这个表,因此查出了两个库名

posted @ 2021-06-24 18:04  西西cc  阅读(2303)  评论(0编辑  收藏  举报