Skip to content

Commit fdd43d8

Browse files
sergeytenmsftrwestMSFT
authored andcommitted
Add missing double-quote into the sample JSON input for COMPRESS() and refresh
1 parent 6198859 commit fdd43d8

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "The COMPRESS function compresses the input expression, using the G
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 03/09/2023
7+
ms.date: 08/28/2025
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: "reference"
@@ -15,7 +15,7 @@ helpviewer_keywords:
1515
- "COMPRESS function"
1616
dev_langs:
1717
- "TSQL"
18-
monikerRange: "= azuresqldb-current || = azuresqldb-mi-current || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqledge-current || = azure-sqldw-latest||=fabric"
18+
monikerRange: "=azuresqldb-current || =azuresqldb-mi-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqledge-current || =azure-sqldw-latest || =fabric"
1919
---
2020
# COMPRESS (Transact-SQL)
2121

@@ -33,7 +33,7 @@ COMPRESS ( expression )
3333

3434
## Arguments
3535

36-
### *expression*
36+
### *expression*
3737

3838
An expression of one of the following data types:
3939

@@ -47,17 +47,17 @@ An expression of one of the following data types:
4747
- **varchar(max)**
4848
- **varchar(*n*)**
4949

50-
For more information, see [Expressions (Transact-SQL)](../../t-sql/language-elements/expressions-transact-sql.md).
50+
For more information, see [Expressions](../language-elements/expressions-transact-sql.md).
5151

52-
## Return type
52+
## Return types
5353

5454
**varbinary(max)**, representing the compressed content of the input.
5555

5656
## Remarks
5757

5858
Compressed data can't be indexed.
5959

60-
The `COMPRESS` function compresses the input expression data. You must invoke this function for each data section to compress. For more information about automatic data compression during storage at the row or page level, see [Data Compression](../../relational-databases/data-compression/data-compression.md).
60+
The `COMPRESS` function compresses the input expression data. You must invoke this function for each data section to compress. For more information about automatic data compression during storage at the row or page level, see [Data compression](../../relational-databases/data-compression/data-compression.md).
6161

6262
## Examples
6363

@@ -70,33 +70,33 @@ INSERT INTO player (
7070
name,
7171
surname,
7272
info
73-
)
73+
)
7474
VALUES (
7575
N'Ovidiu',
7676
N'Cracium',
77-
COMPRESS(N'{"sport":"Tennis","age": 28,"rank":1,"points":15258, turn":17}')
78-
);
77+
COMPRESS(N'{"sport":"Tennis","age": 28,"rank":1,"points":15258, "turn":17}')
78+
);
7979

8080
INSERT INTO player (
8181
name,
8282
surname,
8383
info
84-
)
84+
)
8585
VALUES (
8686
N'Michael',
8787
N'Raheem',
8888
COMPRESS(@info)
89-
);
89+
);
9090
```
9191

9292
### B. Archive compressed version of deleted rows
9393

9494
This statement first deletes old player records from the `player` table. To save space, it then stores the records in the `inactivePlayer` table, in a compressed format.
9595

9696
```sql
97-
DELETE
98-
FROM player
99-
OUTPUT deleted.id,
97+
DELETE FROM player
98+
OUTPUT
99+
deleted.id,
100100
deleted.name,
101101
deleted.surname,
102102
deleted.datemodifier,
@@ -105,7 +105,7 @@ INTO dbo.inactivePlayers
105105
WHERE datemodified < @startOfYear;
106106
```
107107

108-
## See also
108+
## Related content
109109

110-
- [String Functions (Transact-SQL)](../../t-sql/functions/string-functions-transact-sql.md)
111-
- [DECOMPRESS (Transact-SQL)](../../t-sql/functions/decompress-transact-sql.md)
110+
- [String Functions (Transact-SQL)](string-functions-transact-sql.md)
111+
- [DECOMPRESS (Transact-SQL)](decompress-transact-sql.md)

0 commit comments

Comments
 (0)