-
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?
-
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...
-
I cannot delete the whole record from B, coz other fields in it is still needed.
How to remove referential integrity?
-
Alter table drop constraint whatever_the_foreign_key_is_called