When a database collation is changed, only new tables will inherit the new database collation by default. This removes the risk that applications may incorrectly modify data, resulting in possible wrong results or silent data loss. Unless your application explicitly handles data conversion and comparison between different collations, it is recommended that you transition existing data in the database to the new collation. These can be changed by using the COLLATE clause of ALTER TABLE.Ĭhanging the collation of a database or individual columns does not modify the underlying data already stored in existing tables. This statement does not change the collation of the columns in any existing user-defined tables. You can change the collation of any new objects that are created in a user database by using the COLLATE clause of the ALTER DATABASE statement. The char, varchar, text, nchar, nvarchar, or ntext system data types, and all user-defined data types based on these system data types, are changed to the new default collation. When you change the database collation, you change:Īny char, varchar, text, nchar, nvarchar, or ntext columns in system tables are changed to the new collation.Īll existing char, varchar, text, nchar, nvarchar, or ntext parameters and scalar return values for stored procedures and user-defined functions are changed to the new collation. You can find the supported collation names in Windows Collation Name (Transact-SQL) and SQL Server Collation Name (Transact-SQL) or you can use the sys.fn_helpcollations (Transact-SQL) system function. Specify database collation and catalog collation at the time of CREATE DATABASE. The ALTER DATABASE COLLATE statement is not supported on Azure SQL Database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |