determining the character set of a table / database?

You can check the version using

SELECT @@VERSION;

It it’s 9.00 or greater, you can check the collation of a column using

SELECT collation_name FROM sys.columns 
WHERE name="column name"
AND [object_id] = OBJECT_ID('dbo.table name');

And for the database using

SELECT collation_name FROM sys.databases 
WHERE name="database name";

If it’s < 9.0 then you’re using SQL Server 2000 or lower. For 2000 I believe you can check similar columns (e.g. syscolumns.collationid for columns).

Leave a Comment