1. 判断数据库中是否存在某张表
    MySQL:
    select t.table_name from information_schema.TABLES t where t.TABLE_SCHEMA ="database_name" and t.TABLE_NAME ="table_name";
    数据库基础知识汇总
    下面是一个实例,检测user_db数据库中是否存在tbl_user_info表。直接上图,也许效果会更棒。
    数据库基础知识汇总

相关文章: