MySQL中查询某张表属于哪个数据库

-- 查询orderdetail表在哪个数据库
mysql> SELECT table_schema FROM information_schema.TABLES WHERE table_name = 'orderdetail';
+-------------------+
| table_schema     |
+-------------------+
| mybatis              |
+-------------------+
1 row in set (0.00 sec)

posted @ 2020-06-21 18:14  初入门径  阅读(4249)  评论(0)    收藏  举报