使用exists判断。以Oracle为示例:exists(select 1 from all_tables u where 条件一:限制用户名 and 条件二:限制表名)查询系统字典表all_tables,判断表是否存在,存在则结果为真;不存在则结果为假通过结合if语句使用:if exists(select 1 from all_tables u where 条件一:限制用户名 and 条件二:限制表名) then 执行子句一else 执行子句二;