您的位置:首页 > 数据库 > Oracle

在删除表前,oracle如何判断表是否存在,存在就删再创建,不存在直接创建!

2009-03-29 17:42 525 查看
http://topic.csdn.net/u/20070327/17/e322facd-794d-48c8-9ea5-66e4a8394cfe.html

 

declare      
    num       number;      
    begin      
    select       count(1)       into       num       from       user_tables       where       table_name= '大写表名 ';      
    if       num> 0       then      
    execute       immediate       'drop       table       '||大写表名;      
    end       if;      
    execute       immediate       'create       table.... ';      
    end;      
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle table user c
相关文章推荐