我是数据库新手,我对带有触发器或检查约束的表有疑问。我正在使用 SQL Server 管理工作室。
我有下表:
create table item(
startprice char(5) not null,
description char(22) not null,
start_date char(10) not null,
end_date char(10) not null,
indicator char(3) not null
);
我想要做的是这个触发器/约束规则:indicator如果系统日期早于start_dateand end_date,将得到“否”,如果系统日期在 之后,将得到“是” start_date。