Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 select database collation

Author  Topic 

TinyJimbo
Starting Member

3 Posts

Posted - 2010-07-30 : 11:46:44
I need a way to print the collation of every databases.

Right now I have a query that selects the current database's collation :
SELECT DATABASEPROPERTYEX( db_name(), 'collation')

I need to re-write this with a sp_MSforeachdb and I have no clue.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-07-30 : 12:20:53
SELECT name, DATABASEPROPERTYEX(name, 'collation') FROM sys.databases
Go to Top of Page

TinyJimbo
Starting Member

3 Posts

Posted - 2010-07-30 : 12:35:21
Perfect !
Go to Top of Page
   

- Advertisement -