Collation !!!

In this post I don’t wanna explain what is collation. I wanna note that collation can be performed at four levels:

instance, database, column, and expression

To define collation at instance level in sql server setup choose your collation.

To define it at database level we can use COLLATE clause or select it from database options (in sql 05 & 08).

for example:

SELECT *
     FROM test_table
        WHERE ColumnName COLLATE Latin1_General_CS_AS = N'Hasani';

Please note that database collation determines the collation of metadata of objects in the database. So the voice seems to say “This is most important level”.However we know that the lower level is more effective one.

Advertisements
This entry was posted in Database Administration, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks. Bookmark the permalink.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s