You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defines a collation of a database or table column, or a collation cast operation when applied to character string expression. Collation name can be either a Windows collation name or a SQL collation name. If not specified during database creation, the database is assigned the default collation of the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. If not specified during table column creation, the column is assigned the default collation of the database.
@@ -52,14 +52,14 @@ The COLLATE clause can be specified at several levels. These include the followi
52
52
53
53
1. Creating or altering a database.
54
54
55
-
You can use the COLLATE clause of the CREATE DATABASE or ALTER DATABASE statement to specify the default collation of the database. You can also specify a collation when you create a database using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]. If you do not specify a collation, the database is assigned the default collation of the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
55
+
You can use the COLLATE clause of the `CREATE DATABASE` or `ALTER DATABASE` statement to specify the default collation of the database. You can also specify a collation when you create a database using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]. If you do not specify a collation, the database is assigned the default collation of the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
56
56
57
57
> [!NOTE]
58
58
> Windows Unicode-only collations can only be used with the COLLATE clause to apply collations to the **nchar**, **nvarchar**, and **ntext** data types on column-level and expression-level data; these cannot be used with the COLLATE clause to define or change the collation of a database or server instance.
59
59
60
60
2. Creating or altering a table column.
61
61
62
-
You can specify collations for each character string column using the COLLATE clause of the CREATE TABLE or ALTER TABLE statement. You can also specify a collation when you create a table using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]. If you do not specify a collation, the column is assigned the default collation of the database.
62
+
You can specify collations for each character string column using the COLLATE clause of the `CREATE TABLE` or `ALTER TABLE` statement. You can also specify a collation when you create a table using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]. If you do not specify a collation, the column is assigned the default collation of the database.
63
63
64
64
You can also use the `database_default` option in the COLLATE clause to specify that a column in a temporary table use the collation default of the current user database for the connection instead of **tempdb**.
65
65
@@ -73,7 +73,7 @@ The COLLATE clause can be specified at several levels. These include the followi
73
73
74
74
The COLLATE clause can be applied only for the **char**, **varchar**, **text**, **nchar**, **nvarchar**, and **ntext** data types.
75
75
76
-
COLLATE uses *collate_name* to refer to the name of either the SQL Server collation or the Windows collation to be applied to the expression, column definition, or database definition. *collation_name* can be only a specified *Windows_collation_name* or a *SQL_collation_name* and the parameter must contain a literal value. *collation_name* cannot be represented by a variable or expression.
76
+
COLLATE uses *collate_name* to refer to the name of either the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] collation or the Windows collation to be applied to the expression, column definition, or database definition. *collation_name* can be only a specified *Windows_collation_name* or a *SQL_collation_name* and the parameter must contain a literal value. *collation_name* cannot be represented by a variable or expression.
77
77
78
78
Collations are generally identified by a collation name, except in Setup. In Setup, you instead specify the root collation designator (the collation locale) for Windows collations, and then specify sort options that are sensitive or insensitive to case or accents.
0 commit comments