The "CHECK" KeyWord with in Sql Server
the "CHECK" Keyword in Sql Server:
/****************************************************************************/
Create Table datevalues(
orderid int primarykey
cid int
orderdate datetime null,
CHECK(DatePart(yy,orderdate)=2006)
ordermonth int
CHECK(ordermonth=5)
Deliverydate Datetime null
CHECK(DatePArt(mm,orderdate)=ordermonth)
)
/****************************************************************************/
/****************************************************************************/
Create Table datevalues(
orderid int primarykey
cid int
orderdate datetime null,
CHECK(DatePart(yy,orderdate)=2006)
ordermonth int
CHECK(ordermonth=5)
Deliverydate Datetime null
CHECK(DatePArt(mm,orderdate)=ordermonth)
)
/****************************************************************************/
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home