|
-
Mar 18th, 2000, 11:41 PM
#1
Thread Starter
Junior Member
I like to delete a record from table A, which is a foreign key in table B (ie. the record is Primary Key in A but not in B). When I tried to delete, it gives me an error message which says somethings like "cannot be deleted causes it is related to table B". How do I delete the record in A?
-
Mar 19th, 2000, 12:27 AM
#2
Frenzied Member
In some DBMS packages, you have the option to "cascade delete". This, basically, deletes all foreign keys then the primary. You'll need to delete the record(s) from table B (and any other table that uses table A as a foreign key) _or_ remove referential integrity...
-
Mar 19th, 2000, 02:14 AM
#3
Thread Starter
Junior Member
I cannot delete the whole record from B, coz other fields in it is still needed.
How to remove referential integrity?
-
Mar 19th, 2000, 11:37 PM
#4
Frenzied Member
Alter table drop constraint whatever_the_foreign_key_is_called
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|