?
学习:
http://www.cnblogs.com/huanghai223/archive/2011/06/29/2093660.html
?
declare
? v_count integer := 0;
begin
? select count(1) into v_count from user_constraints where constraint_name = 'SYS_C008270';
? if (v_count > 0) then
? ? --prd
? ? execute immediate 'alter table tfz_grade_detail_rec_his drop constraint SYS_C008270';
? else
? ? --stg
? ? execute immediate 'alter table tfz_grade_detail_rec_his drop constraint SYS_C008170';
? end if;
end;