Tuesday, March 20, 2012

Collation

I have a column in SQL Server table which needs to be Case Sensitive to where
clause in queries
i know this can be changed by changing the collation
Can someone give me the steps to do this
Right now it has default SQL Server collation SQL_Latin1_General_Cp1_CI_AS
Also how do you find collation of database, table or column
i do it by reverse engineering the scipt using Enterprise MAnager, is there
a command ?
ThanksYou can change collation for a column using ALTER TABLE... ALTER COLUMN... More information in Books
Online.
> Also how do you find collation of database, table or column
Database: Use the DATABASEPROPERTYEX() function.
Table doesn't have a collation.
Column: sp_help
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Sanjay" <Sanjay@.discussions.microsoft.com> wrote in message
news:601D7057-9434-40F2-8BD9-335F6D68C84A@.microsoft.com...
> I have a column in SQL Server table which needs to be Case Sensitive to where
> clause in queries
> i know this can be changed by changing the collation
> Can someone give me the steps to do this
> Right now it has default SQL Server collation SQL_Latin1_General_Cp1_CI_AS
> Also how do you find collation of database, table or column
> i do it by reverse engineering the scipt using Enterprise MAnager, is there
> a command ?
> Thanks
>

No comments:

Post a Comment