Skip to content

Commit 473edb0

Browse files
authored
Update constants-transact-sql.md
1 parent 2904efe commit 473edb0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/t-sql/data-types/constants-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
4040
A constant, also known as a literal or a scalar value, is a symbol that represents a specific data value. The format of a constant depends on the data type of the value it represents.
4141

4242
## Character string constants
43-
Character string constants are enclosed in single quotation marks and include alphanumeric characters (a-z, A-Z, and 0-9) and special characters, such as exclamation point (!), at sign (@), and number sign (#). Character string constants are assigned the default collation of the current database, unless the COLLATE clause is used to specify a collation. Character strings typed by users are evaluated through the code page of the computer and are translated to the database default code page if it is required.
43+
Character string constants are enclosed in single quotation marks and include alphanumeric characters (a-z, A-Z, and 0-9) and special characters, such as exclamation point (!), at sign (@), and number sign (#). Character string constants are assigned the default collation of the current database. If the COLLATE clause is used, the conversion to the database default code page still happens before the conversion to the collation specified by the COLLATE clause. Character strings typed by users are evaluated through the code page of the computer and are translated to the database default code page if it is required.
4444

4545
> [!NOTE]
46-
> When a [UTF8-enabled collation](../../relational-databases/collations/collation-and-unicode-support.md#utf8) is specified using the COLLATE clause, the character string behaves like a [Unicode string](#unicode-strings).
46+
> When a [UTF8-enabled collation](../../relational-databases/collations/collation-and-unicode-support.md#utf8) is specified using the COLLATE clause, conversion to the database default code page still happens before the conversion to the collation specified by the COLLATE clause. Conversion is not done directly to the specified Unicode-enabled collation. For more information, see [Unicode string](#unicode-strings).
4747
4848
If the QUOTED_IDENTIFIER option has been set OFF for a connection, character strings can also be enclosed in double quotation marks, but the Microsoft [OLE DB Driver for SQL Server](../../connect/oledb/oledb-driver-for-sql-server.md) and [ODBC Driver for SQL Server](../../connect/odbc/download-odbc-driver-for-sql-server.md) automatically use `SET QUOTED_IDENTIFIER ON`. We recommend using single quotation marks.
4949

@@ -67,12 +67,12 @@ Character string constants support enhanced [collations](../../relational-databa
6767
> Character constants greater than 8000 bytes are typed as **varchar(max)** data.
6868
6969
## Unicode strings
70-
Unicode strings have a format similar to character strings but are preceded by an N identifier (N stands for National Language in the SQL-92 standard) or specified through the use of the COLLATE clause with an [UTF8-enabled collation](../../relational-databases/collations/collation-and-unicode-support.md#utf8).
70+
Unicode strings have a format similar to character strings but are preceded by an N identifier (N stands for National Language in the SQL-92 standard).
7171

7272
> [!IMPORTANT]
7373
> The N prefix must be uppercase.
7474
75-
For example, `'Michél'` is a character constant while `N'Michél'` is a Unicode constant. Unicode constants are interpreted as Unicode data, and are not evaluated by using a code page. Unicode constants do have a collation. This collation primarily controls comparisons and case sensitivity. Unicode constants are assigned the default collation of the current database, unless the COLLATE clause is used to specify a collation. Unicode data uses the variable-width encoding. For more information, see [Collation and Unicode Support](../../relational-databases/collations/collation-and-unicode-support.md#storage_differences).
75+
For example, `'Michél'` is a character constant while `N'Michél'` is a Unicode constant. Unicode constants are interpreted as Unicode data, and are not evaluated by using a code page. Unicode constants do have a collation. This collation primarily controls comparisons and case sensitivity. Unicode constants are assigned the default collation of the current database. If the COLLATE clause is used, the conversion to the database default collation still happens before the conversion to the collation specified by the COLLATE clause. For more information, see [Collation and Unicode Support](../../relational-databases/collations/collation-and-unicode-support.md#storage_differences).
7676

7777
Unicode string constants support enhanced collations.
7878

0 commit comments

Comments
 (0)