时间:2021-07-01 10:21:17 帮助过:66人阅读
SELECT information_schema.SCHEMATA.SCHEMA_NAME FROM information_schema.SCHEMATA where SCHEMA_NAME='databaseName';
2、查看指定的数据库下是否存在某张表
SELECT DISTINCT t.table_name, n.SCHEMA_NAME FROM information_schema.TABLES t, information_schema.SCHEMATA n WHERE t.
table_name = 'tableName' AND n.SCHEMA_NAME = 'databaseName';
以上就是MySQL之-查询指定的数据库和表是否存在的详细内容,更多请关注Gxl网其它相关文章!