伙计们有任何其他方法可以确定除下面以外的表格
select count(*) from <table> where rownum =1select * from user_table where table_name=<table>请告诉我使用oracle sql检查表是否存在的最佳方法.
谢谢你的答案,我的要求是从当月的第一个日期,即2010年12月1日检查,数据库中存在suresh_20101201格式的表名,如果没有,那么它应该检查表suresh_20101202及其上直到suresh_20101231.是否可以在oracle sql查询中执行.
Dai*_*ius 27
你可以这样做(在oracle中,在mssql中有一点不同):
select count(*)
from all_objects
where object_type in ('TABLE','VIEW')
and object_name = 'your_table_name';
Run Code Online (Sandbox Code Playgroud)