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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error On Primary KEy.....

Author  Topic 

mohit_sharan
Starting Member

22 Posts

Posted - 2003-11-24 : 00:50:11
Hi,

I want to create primary key based on one colum. The issue is while creaing Primary Key the data are not case secsetive. For Example : 0500951081994A0014B081 001
0500951081994A0014b081 001

Both are treated as same. Is there a way to take the data as case sencetive while creating Primary Key. So that the above values will be taken as two diffrent record.

Thanks with Regards.
-Mohit.

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-11-24 : 02:29:04
What is the datatype of the column? If it is varchar or char, you can use a Case-sensitive collation for the column datatype (SQL Server 2000 only).


CREATE TABLE Foo(
[myKey] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CS_AS PRIMARY KEY
....
)


Look up more details in the Books Online.

And please dont cross post!!

Owais


Where there's a will, I want to be in it.
Go to Top of Page
   

- Advertisement -