Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deleting a row from parent table

446610Sep 14 2006 — edited Sep 15 2006
Dear Guru's


I am having two table with parent - child relationship. My problem is when I am deleting a row from parent table the curresponding child row from child table also should be deleted.

My Primary table 'Employee, EMPID Primary key

Child table 'Privilage' inthis EMPID referencing the EMPID of Employee table

My need is when I am deleting a row from parent table the curresponding child row from child table also should be deleted

I issued the SQL query like,
delete from employee where empid='12345' cascade constraints;

Then it showing me error like,

ERROR at line 1:
ORA-00933: SQL command not properly ended


Please resolve my issue , Its Top urgent

Thanks & Cheers
Antony
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2006
Added on Sep 14 2006
9 comments
493 views