Skip to content

Commit 2c119bb

Browse files
Clarified option at the top (#33943)
1 parent 06f3b86 commit 2c119bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/t-sql/statements/set-ansi-padding-transact-sql.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: "SET ANSI_PADDING (Transact-SQL)"
33
description: SET ANSI_PADDING controls the way the column stores values shorter than the defined size of the column.
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
6-
ms.reviewer: randolphwest
7-
ms.date: 07/08/2024
6+
ms.reviewer: randolphwest, jovanpop
7+
ms.date: 04/28/2025
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: reference
@@ -28,6 +28,8 @@ monikerRange: ">=aps-pdw-2016 || =azure-sqldw-latest || >=sql-server-2016 || >=s
2828
[!INCLUDE [sql-asdbmi-asa-pdw-fabricse-fabricdw](../../includes/applies-to-version/sql-asdbmi-asa-pdw-fabricse-fabricdw.md)]
2929

3030
Controls the way the column stores values shorter than the defined size of the column, and the way the column stores values that have trailing blanks in **char**, **varchar**, **binary**, and **varbinary** data.
31+
- `SET ANSI_PADDING ON` - preserves the trailing blanks in the string values when they are inserted into a column. This is ANSI-compliant behavior.
32+
- `SET ANSI_PADDING OFF` - trims the trailing blanks in the string values when they are inserted into a column. This is not recommended behavior.
3133

3234
> [!NOTE]
3335
> `SET ANSI_PADDING OFF`, and the `ANSI_PADDING OFF` database option, are deprecated. In [!INCLUDE [_ss2017](../../includes/sssql17-md.md)] and later versions, and [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)] and [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)], `ANSI_PADDING` is always set to `ON`. Deprecated features shouldn't be used in new applications. For more information, see [Deprecated Database Engine features in SQL Server 2017](../../database-engine/deprecated-database-engine-features-in-sql-server-2017.md#transact-sql-1).

0 commit comments

Comments
 (0)