在SQL Server 2000中,有商品表(商品号,商品名,单价)和销售表(商品号,销售时间,销售价格)。现要限制"销售价格"的取值必须在此商品"单价"的0.6倍到1.5倍范围之内,实现这个约束的正确代码是()
A.CHECK(销售价格BETWEEN单价*0.6 AND单价*1.5)
B.CHECK(销售价格BETWEEN商品表.单价*0.6 AND商品表.单价*1.5)
C.CREATE TRIGGER tri_Sales ON销售表FOR INSERT,UPDATE
AS IF EXISTS(SELECT*FROM INSERTED a JOIN商品表b
ON a.商品号=b.商品号
WHERE销售价格NOT BETWEEN单价*0.6 AND单价*1.5)
ROLLBACK
D.CREATE TRIGGER tri_Sales ON销售表INSTEAD OF INSERT,UPDATE AS
IF EXISTS(SELECT*FROM INSERTED a JOIN商品表b
ON a.商品号=b.商品号
WHERE销售价格NOT BETWEEN单价*0.6 AND单价*1.5)
ROLLBACK