ORACLE判断数据库中某个表是否存在

select count(*)
        from user_tables
       where upper(table_name) = upper('query_tb_name')

user_tables是oracle当前用户的系统表,在工作中有时需要对现有数据库进行清理,统计,分析,想要知道库里有那些表,都有多少数据,就可以查询user_tables这个表。

upper()是将所要查询的表名query_tb_name全部转化成大写,table_name是user_tables的一个字段

猜你喜欢

转载自blog.csdn.net/weixin_40626699/article/details/88052923