Skip to content

Commit 1a3a30f

Browse files
Merge pull request #35894 from MicrosoftDocs/WilliamDAssafMSFT-patch-2
Update binary-and-varbinary-transact-sql.md
2 parents c846849 + 6e827e7 commit 1a3a30f

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

docs/t-sql/data-types/binary-and-varbinary-transact-sql.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "binary and varbinary (Transact-SQL)"
2+
title: "Binary and Varbinary (Transact-SQL)"
33
description: "Binary data types of either fixed length or variable length."
44
author: MikeRayMSFT
55
ms.author: mikeray
6-
ms.reviewer: randolphwest
7-
ms.date: 09/24/2024
6+
ms.reviewer: randolphwest, jovanpop
7+
ms.date: 11/20/2025
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: "reference"
@@ -67,7 +67,7 @@ When other data types are converted to **binary** or **varbinary**, the data is
6767

6868
Converting data to the **binary** and **varbinary** data types is useful if **binary** data is the easiest way to move around data. At some point, you might convert a value type to a binary value of large enough size and then convert it back. This conversion always results in the same value if both conversions are taking place on the same version of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. The binary representation of a value might change from version to version of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
6969

70-
You can convert **int**, **smallint**, and **tinyint** to **binary** or **varbinary**. If you convert the **binary** value back to an integer value, this value will be different from the original integer value if truncation has occurred. For example, the following SELECT statement shows that the integer value `123456` is stored as a binary `0x0001e240`:
70+
You can convert **int**, **smallint**, and **tinyint** to **binary** or **varbinary**. If you convert the **binary** value back to an integer value, this value is different from the original integer value if truncation occurred. For example, the following SELECT statement shows that the integer value `123456` is stored as a binary `0x0001e240`:
7171

7272
```sql
7373
SELECT CAST( 123456 AS BINARY(4) );
@@ -83,10 +83,10 @@ The following batch shows that this silent truncation can affect arithmetic oper
8383

8484
```sql
8585
DECLARE @BinaryVariable2 BINARY(2);
86-
86+
8787
SET @BinaryVariable2 = 123456;
8888
SET @BinaryVariable2 = @BinaryVariable2 + 1;
89-
89+
9090
SELECT CAST( @BinaryVariable2 AS INT);
9191
GO
9292
```
@@ -96,12 +96,8 @@ The final result is `57921`, not `123457`.
9696
> [!NOTE]
9797
> Conversions between any data type and the **binary** data types are not guaranteed to be the same between versions of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
9898
99-
## Limitations
100-
101-
Currently, in [!INCLUDE [fabric](../../includes/fabric.md)], only varbinary(*n*) is supported. The binary and varbinary(max) data types are not supported.
102-
103-
## See also
99+
## Related content
104100

105-
- [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md)
106-
- [Data Type Conversion (Database Engine)](../../t-sql/data-types/data-type-conversion-database-engine.md)
107-
- [Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
101+
- [CAST and CONVERT (Transact-SQL)](../functions/cast-and-convert-transact-sql.md)
102+
- [Data Type Conversion (Database Engine)](data-type-conversion-database-engine.md)
103+
- [Data Types (Transact-SQL)](data-types-transact-sql.md)

0 commit comments

Comments
 (0)