Today we will go over very quick tip about finding out collation of database and table column. Collations specify the rules for how strings of character data are sorted and compared, based on the norms of particular languages and locales
Today’s script are self explanatory so I will not explain it much.
/* Find Collation of SQL Server Database */
SELECT DATABASEPROPERTYEX('AdventureWorks', 'Collation')
GO
/* Find Collation of SQL Server Database Table Column */
USE AdventureWorks
GO
SELECT name, collation_name
FROM sys.columns
WHERE OBJECT_ID IN (SELECT OBJECT_ID
FROM sys.objects
WHERE type = 'U'
AND name = 'Address')
AND name = 'City'

Reference : Pinal Dave (http://blog.SQLAuthority.com)












[...] 20, 2008 by pinaldave Just a day before I wrote about SQL SERVER – Find Collation of Database and Table Column Using T-SQL and I have received some good comments and one particular question was about how to change [...]
You can do the same with
select table_name, column_name, collation_name
from information_schema.columns
where table_name = @table_name
Thank You very much…
Hmm,
Anyone else get this error when attempting to execute the output from script 3?:
ERROR: Load object, dump buffer.
ERROR: Load object, dump buffer.
I too got the following error for 3rd script (script to add dependencies) ERROR: Load object, dump buffer.
I know this is late, but it will help someone in future…We receive this error if the sequence is not followed properly during the execution. we see this error when step 14 is accidentally skipped.
Sir, Let suppose i have a column name “something_contact” in a table of database. Now i want to make a filter that will show me all the columns which contains “contact”. Remember it should be column not table containing “contact”. Is it posible?
If i am getting you right, i think i you can use like clause:
SELECT name
FROM sys.columns
where name Like ‘%contact%;
[...] Server Interview Questions and Answers ISBN: 1466405643 Page#46-47 Find Collation of Database and Table Column Using T-SQL SQL SERVER – Cannot resolve collation conflict for equal to operation Find Database Collation [...]
[...] Find Collation of Database and Table Column Using T-SQL [...]
[...] Find Collation of Database and Table Column Using T-SQL Collations specify the rules for how strings of character data are sorted and compared, based on the norms of particular languages and locales. This script quickly finds the collation of the database and tables using T-SQL. [...]
[...] Find Collation of Database and Table Column Using T-SQL [...]