![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
#12
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
#13
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
#14
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
#15
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
#16
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
#17
| |||
| |||
|
|
is it possible to define a check with the following rules, without using a trigger? When inserting a value in field1: - if field2=true then field1 must be 0 - if field2=false then field1 may be any number I've thought about this: CHECK ((field2=true AND field1=0) OR (field2=false AND field1>0)) is it right? |
![]() |
| Thread Tools | |
| Display Modes | |
| |