AND DATEDIFF(month, DateOfBirth, GETDATE()) > 0) or (DATEDIFF(year, DateOfBirth, getdate())=18 and DATEDIFF(month,DateOfBirth, getdate())>0)
or (DATEDIFF(year, Date
所以我写了这个约束:GORETURNS bitBEGIN IF EXISTS(SELECT * FROM Main
where DATEDIFF(MINUTE, ReceptionBegin, @receptionBegin) <= 30 or DATEDIFF(MINUTE, @receptionBegin,