我的表:
CREATE TABLE sales
(ord INTEGER NOT NULL,
ship INTEGER NOT NULL);
ALTER TABLE sales
ADD CONSTRAINT order_check CHECK(ord < 10);
然后我停用了CONSTRAINT
:
ALTER TABLE sales NOCHECK CONSTRAINT ALL;
INSERT INTO sales VALUES(10,1)
SELECT * FROM sales
如何启用我的所有CONSTRAINT
?
答案 0 :(得分:2)
你试过吗
ALTER TABLE sales CHECK CONSTRAINT ALL;
答案 1 :(得分:2)
每MSDN doc:
ALTER TABLE sales CHECK CONSTRAINT ALL;
答案 2 :(得分:1)
CHECK
:
ALTER TABLE sales CHECK CONSTRAINT ALL;