Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jamsman
Starting Member
3 Posts |
Posted - 2005-02-25 : 11:43:28
|
| Im trying to create a table with three date attributes, the problem is that i need to check that the second date is after the first date can i do this with a check constraint if so how if not how???????Thank you |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-02-25 : 12:05:44
|
| [code]USE NorthwindGOSET NOCOUNT ONCREATE TABLE myTable99 ( Col1 int IDENTITY(1,1) , Col2 Datetime DEFAULT Getdate() , Col3 datetime , CHECK (Col2 < Col3))GOINSERT INTO myTable99(Col3)SELECT '1/1/2006'GOSELECT * FROM myTable99GOINSERT INTO myTable99(Col3)SELECT '1/1/2004'GOSET NOCOUNT OFFDROP TABLE myTable99GO[/code]Brett8-) |
 |
|
|
|
|
|