UNIQUE Constraint but case sensitive

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UNIQUE Constraint but case sensitive

ajay-7

Hi,

I need to create a unique constraint on a column of type varchar, but it is not case sensitive by default.
Does any one know how to make a unique constraint case sensitive?

Thanks and best regards,

Ajay Sonawane

 

 

Reply | Threaded
Open this post in threaded view
|

Re: UNIQUE Constraint but case sensitive

Dan Kennedy

> Hi,
>
> I need to create a unique constraint on a column of type varchar, but it is
> not case sensitive by default.
> Does any one know how to make a unique constraint case sensitive?
>

CREATE TABLE abc(a UNIQUE COLLATE NOCASE);

Bear in mind that the "NOCASE" collation sequence only knows about the 26
letters used in the English language.




               
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html