Temporarily ignore or turn-off restraints, import data, then turn them back on?
Is there a T-SQL command to temporarily ignore or turn-off restraints, import data, then turn them back on?
-- turn off constraints for table A
--import data
-- INSERT INTO table A
-- turn constraints back on for table A
Perhaps not best practice, but I need to get some data into a few tables for a new project, for testing, and I don't have time to try an unravel FK constraints.
Open in new window
When the script above runs, here are the messages:
Open in new window
ApplicationComponents and ApplicationFeatures seem to reference each other. UGH.
How do I drop and then enable just ONE foreign key constaint? (( on table Application Components ))