begin for cur in (select owner, constraint_name , table_name from all_constraints where upper(owner) = upper('agroradb2') and upper(TABLE_NAME) in (select TABLE_NAME from all_constraints where upper(owner) = upper('agroradb2'))) loop execute immediate 'ALTER TABLE '||cur.owner||'.'||cur.table_name||' MODIFY CONSTRAINT "'||cur.constraint_name||'" DISABLE '; end loop; exception when others then dbms_output.put_line(sqlerrm);end;