1.当前用户下是否有某个表
select count(*) from user_tables where table_name = 'TABLE_NAME';
注意,一般情况下,引号里面的table_name要全部用大写。
如果结果为1,表示有这个表,为0表示没有这个表。
2.某个用户下是否有某个表?
select count(*) from dba_tables where owner = 'USER_NAME' and table_name = 'TABLE_NAME';
1.当前用户下是否有某个表
select count(*) from user_tables where table_name = 'TABLE_NAME';
注意,一般情况下,引号里面的table_name要全部用大写。
如果结果为1,表示有这个表,为0表示没有这个表。
2.某个用户下是否有某个表?
select count(*) from dba_tables where owner = 'USER_NAME' and table_name = 'TABLE_NAME';