which method should one follow to drop master table if its primary key is referenced by a foriegn key in some other table?
i know about on delete cascade, is there any other way? which is the best practice
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This DDL statement will blow away a table, dropping any foreign keys which reference it.
edit
The above syntax works in Oracle and SQL Server. If you get a syntax error you will need to consult the SQL reference for your flavour of database.