Skip to content

Commit 5563d7c

Browse files
committed
Update substring syntax.
1 parent ce84a68 commit 5563d7c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/t-sql/functions/substring-transact-sql.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,17 @@ Returns part of a character, binary, text, or image expression in [!INCLUDE[ssNo
3030
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3131

3232
## Syntax
33+
34+
Syntax for SQL Server, through [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)].
3335

3436
```syntaxsql
35-
SUBSTRING ( expression, start, length )
37+
SUBSTRING ( expression , start , length )
38+
```
39+
40+
Syntax for [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)], [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)], [!INCLUDE [fabric-se](../../includes/fabric-se.md)], and [!INCLUDE [fabric](../../includes/fabric.md)].
41+
42+
```syntaxsql
43+
SUBSTRING ( expression , start [, length ] )
3644
```
3745

3846
## Arguments
@@ -44,6 +52,8 @@ SUBSTRING ( expression, start, length )
4452

4553
*length*
4654
Is a positive integer or **bigint** expression that specifies how many characters of the *expression* will be returned. If *length* is negative, an error is generated and the statement is terminated. If the sum of *start* and *length* is greater than the number of characters in *expression*, the whole value expression beginning at *start* is returned.
55+
56+
In [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)], [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)], [!INCLUDE [fabric-se](../../includes/fabric-se.md)], and [!INCLUDE [fabric](../../includes/fabric.md)], *length* is optional. Defaults to expression length.
4757

4858
## Return Types
4959
Returns character data if *expression* is one of the supported character data types. Returns binary data if *expression* is one of the supported **binary** data types. The returned string is the same type as the specified expression with the exceptions shown in the table.

0 commit comments

Comments
 (0)