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 |
|
mridang_agarwal
Starting Member
22 Posts |
Posted - 2006-10-09 : 00:51:34
|
| CREATE TABLE cust_sample ( cust_id int PRIMARY KEY, cust_name char(50), cust_address1 char(50), cust_address2 char(50), cust_address3 char(50), cust_credit_limit money, )Hey guys,I would like to place a contraint that specifies that either cust_address1, cust_address2 or cust_address3 must be filled in. How do I do this? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-09 : 01:13:21
|
| [code]CREATE TABLE cust_sample(cust_id intPRIMARY KEY,cust_name char(50),cust_address1 char(50),cust_address2 char(50),cust_address3 char(50),cust_credit_limit money,check (cust_address1 is not null or cust_address2 is not null or cust_address3 is not null))[/code]Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
benjo
Starting Member
8 Posts |
Posted - 2006-10-26 : 04:11:33
|
| harsh may be right. |
 |
|
|
|
|
|
|
|