- ALTER TABLE Orders
- NOCHECK CONSTRAINT
- FK_Orders_Customers
- -- Add a new Order record for a non-existent customer
- INSERT INTO Orders (CustomerID) VALUES ('BLAH')
- -- Select all orders for the non-existent customer
- SELECT * FROM Orders WHERE CustomerID = 'BLAH'
- 启用后
-
- ALTER TABLE Orders
- CHECK CONSTRAINT
- FK_Orders_Customers
- -- Add a new Order record for a non-existent customer
- INSERT INTO Orders (CustomerID) VALUES ('BLEH')