This is a discussion on Need to create case sensitive Uniqiue Indexes within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, How Can I create a case sensitive unique index so that A1 and a1 are treated as different ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Steve Thorpe (stephenthorpe@nospam.hotmail.com) writes: > How Can I create a case sensitive unique index so that A1 and a1 are > treated as different ? > > I dont mind if I have to make a global DB change. You should change the database to use a case-sensitive collation - and maybe the entire server, since collation mix on the same server can cause problems with tempdb. You can achieve this in several ways. You can bulk out all data and build a new database from scripts where you have changed the collation and then bulk data back. You can also issue ALTER TABLE ALTER COLUMN for all columns with character data. You also need to use ALTER COLLATION SET COLLATION. (This latter command sets the default for future columns, but does not affect existing ones.) To change the collation for master, you use the rebuildm facility. -- Erland Sommarskog, SQL Server MVP, sommar@algonet.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp |