Sagewire Logo

Unique constraint for the columns doesn't work when one of values is null.

2 Message(s) by 2 Author(s) originally posted in php sql


From: Pugi! Date:   Friday, September 14, 2007
I have a table with a unique constraint on two integer columns.
Works fine, but one of the two columns can be null and then the
constraint doesn't work.
1 2 : OK
1 3 : OK
1 2 : error
2 null : OK
2 null : OK -> I want this to result in an error

Pugi!


From: Captain Paralytic Date:   Friday, September 14, 2007
wrote in message:
I have a table with a unique constraint on two integer columns.
Works fine, but one of the two columns can be null and then the
constraint doesn't work.
1 2 : OK
1 3 : OK
1 2 : error
2 null : OK
2 null : OK -> I want this to result in an error
Pugi!



Don't multi-post. Cross-post if you must but do not multi post It
wastes
people's time. http://www.blakjak.demon.co.uk/mul_crss.htm



Next Message: Problem Getting MS SQL Data With Single Quotes


Blogs related to Unique constraint for the columns doesn't work when one of values is null.

The official Magazine Website.
piccilo petes started a business in home care pleasant acres trailer park az www24seven.net pet shop river street hackensack nj wwwutrackonline.com pchcinema.com unique couture mother of the bride notes to parents from teachers realtors ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional