加载中…
个人资料
大一吧浪
大一吧浪
  • 博客等级:
  • 博客积分:0
  • 博客访问:640
  • 关注人气:3
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
博文
标签:

杂谈

分类: oracle

确保权限:

select * from dba_role_privs where grantee='LOGANALYSER';

创建存储过程:

create or replace procedure p_create_table
is
v_count number(10);
tableName VARCHAR2(20);

begin
     tableName := 'LOGDETAILS_'||to_char( sysdate,'yyyymmdd' );
     --oracle存储过程实现mysql语法中的drop table  table_name if exists
     select count(*)
     into v_count
     from user_objects
     where object_name = upper( tableName);
     if v_count > 0 then
      execute immediate 'drop table ' || tableName ||' cascade constraints';
      end if;
     

  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有