How to alter or add foreign key constr to table having child rows or data
Hi,
I have a table by name DEPT in which the column DEPTNO is a primary key column and have data in it for all the columns . Now I have a EMP table where in the column DEPTNO is not having any constraint including foreign key constraint too. Now i have data in the EMP table for all the columns . now i would like to add the foreign key constraint to DEPTNO column in the EMP table referencing the DEPTNO column in the DEPT table. Both the table do not have any null values .
I need to add the foreign key without deleting the data in the EMP table.
Please advice.
Regards,
Vinesh