阿宽

Nothing is more powerful than habit!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

oracle判断表是否存在

Posted on 2009-05-20 17:21  宽田  阅读(1019)  评论(0)    收藏  举报

declare  
cou_num   number;   
  begin  
     select count(tname) into cou_num from tab 
where tname =upper('表名');
     
if (cou_num>0) then
     dbms_output.put_line(
'该表存在');
     end 
if;
end;