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
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.
39
39
40
+
> [!NOTE]
41
+
> The term *constant* in application development and the concept of a *constant* in Transact-SQL (T-SQL) are not the same. There is no specific way to set a global static value in T-SQL. Constants in T-SQL are the equivalent of string literal values.
42
+
40
43
## Character string constants
41
44
42
45
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.
@@ -156,7 +159,7 @@ The following are examples of **float** or **real** values:
156
159
157
160
**money** constants are represented as string of numbers with an optional decimal point and an optional currency symbol as a prefix. **money** constants aren't enclosed in quotation marks.
158
161
159
-
[!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] doesn't enforce any kind of grouping rules such as inserting a comma (`,`) every three digits in strings that represent money.
162
+
[!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] doesn't enforce any kind of grouping rules such as inserting a comma (`,`) every three digits in strings that represent money.
160
163
161
164
> [!NOTE]
162
165
> Commas are ignored anywhere in a string literal that is cast to the **money** data type.
@@ -214,9 +217,9 @@ Signed **money** expressions:
214
217
215
218
## Enhanced collations
216
219
217
-
The [!INCLUDE[ssDE-md](../../includes/ssde-md.md)] supports character and Unicode string constants that support enhanced collations. For more information, see the [COLLATE (Transact-SQL)](../../t-sql/statements/collations.md) clause.
220
+
The [!INCLUDE[ssDE-md](../../includes/ssde-md.md)] supports character and Unicode string constants that support enhanced collations. For more information, see the [COLLATE (Transact-SQL)](../../t-sql/statements/collations.md) clause.
0 commit comments