SQL statements related to oracle table for deleting Foreign keys 1. find all the tables that reference a table with the primary key as the foreign key. PK_SRVMONITOR_SERVICE is the primary key name of the table. The SQL code is select c. constraint_name, c. table_name, c. constraint_type, c. r_constraint_name from user_constraints c where c. r_constraint_name = 'pk _ SRVMONITOR_SERVICE 'and c. constraint_type = 'R' 2. delete the FK_BIZSYS_RES_RES_ID foreign key in the SM_BIZSYS_RES TABLE. The SQL code ALTER TABLE SM_BIZSYS_RES DROP CONSTRAINT FK_BIZSYS_RES_RES_ID 3. ADD the primary KEY in the SRVMONITOR_SERVICE TABLE in the CONSTRAINT FK_SM_LASTPERF TABLE as the foreign key SQL code ALTER TABLE ADD CONSTRAINT into FOREIGN KEY (SRV_ID) REFERENCES SRVMONITOR_SERVICE (SRV_ID); 4. find all sequenceJava codes of the current user select 'create sequence '| sequence_name | 'minvalue' | min_value | 'maxvalue' | max_value | 'start with' | last_number | 'crement by '| increment_by | (case when cache_size = 0 then 'nocace' else 'cache' | cache_size end) | '; 'seq from user_sequences