判断table是否存在
show tables like
判断db和table是否存在
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判断db、table是否存在
判断table是否存在
show tables like
判断db和table是否存在
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';
声明: 本文采用 BY-NC-SA 授权。转载请注明转自: levy