Skip to content

Commit 52a1b87

Browse files
20240404 overloaded constant note
1 parent c938489 commit 52a1b87

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Constants (Transact-SQL)"
44
author: MikeRayMSFT
55
ms.author: mikeray
66
ms.reviewer: randolphwest
7-
ms.date: 03/20/2023
7+
ms.date: 04/04/2024
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: "reference"
@@ -37,6 +37,9 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
3737

3838
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.
3939

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+
4043
## Character string constants
4144

4245
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:
156159

157160
**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.
158161

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.
160163

161164
> [!NOTE]
162165
> Commas are ignored anywhere in a string literal that is cast to the **money** data type.
@@ -214,9 +217,9 @@ Signed **money** expressions:
214217

215218
## Enhanced collations
216219

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.
218221

219-
## See also
222+
## Related content
220223

221224
- [Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
222225
- [Expressions (Transact-SQL)](../../t-sql/language-elements/expressions-transact-sql.md)

0 commit comments

Comments
 (0)