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 |
|
rameshgoudd
Starting Member
13 Posts |
Posted - 2008-01-03 : 23:16:21
|
| hi,in my table i have a column named seats..datatype is int...and this seats value dynamcally changes..how can i set the sesta value..means it should not be less than 0in sql or mysql |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-01-03 : 23:22:09
|
| You can put check constraints (value must > 0) on the column like:ALTER TABLE CheckTblADD CONSTRAINT chkRow CHECK (seats > 0) |
 |
|
|
rameshgoudd
Starting Member
13 Posts |
Posted - 2008-01-03 : 23:35:16
|
quote: Originally posted by rmiao You can put check constraints (value must > 0) on the column like:ALTER TABLE CheckTblADD CONSTRAINT chkRow CHECK (seats > 0)
hi i did like that onlyif i update the seats with 1..then it is updating ..the condition is not working |
 |
|
|
Koji Matsumura
Posting Yak Master
141 Posts |
Posted - 2008-01-04 : 03:10:39
|
| It is TRUE that 1 > 0. |
 |
|
|
|
|
|