GTTools.com

04 Nov

How to change a column collation to the default database collation

If you for some reason needs to change the collation of a column in SQL Server to the default database collation, you can use the following syntax:
ALTER TABLE <table_name> ALTER COLUMN <column_name> <current_data_type> COLLATE database_default
Eg.:
ALTER TABLE myTable ALTER COLUMN myColumn TEXT COLLATE database_default

© 2010 GTTools.com | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo