ANSI_PADDING can be set ON or OFF. It controls the way 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.
Transact SQL Statement to set it ON
SET ANSI_PADDING ON
Transact SQL Statement to set it OFF
SET ANSI_PADDING OFF
ANSI_PADDING setting is ON :
char(n) and binary(n) - Pads value with trailing blanks for char columns and with trailing zeros for binary columns to the length of column.
varchar(n) or varbinary(n) - Trailing blanks in varchar are not trimmed . Trailing zeroes in varbinary are not trimmed. Does not pads trailing blanks or zeroes to the length of column.
ANSI_PADDING setting is OFF :
char(n) and binary(n) - Pads value with trailing blanks for char columns and with trailing zeros for binary columns to the length of column.
varchar(n) or varbinary(n) - Trailing blanks in varchar are trimmed . Trailing zeroes in varbinary are trimmed. Does not pads trailing blanks or zeroes to the length of column.
Popular Posts
-
Answer : WCF belongs to System.ServiceModel
-
Different types of assemblies are : Static and Dynamic assemblies Private and Shared assemblies Single file and Multiple file assemblies ...
-
Authorization is used to determine whether user has access to resource or not. There are two ways to authorize a resource : File authoriza...
-
Operation behaviour are scoped at Operation level. It is used for transaction flow , serialization , parameter handling.
-
Different type of method parameters in C# are : Value Parameter Reference Parameter Output Parameter
-
Abstract class has following features : cannot be instantiated contain abstact methods and properties cannot modify abstract class with s...
-
OOPs concepts that C# supports are : Abstraction : is a process that involves identifying the crucial behavior of an object and eliminatin...
-
Characteristics of well designed normalized database are : Table should have identifier Table should store data for single type of entity...
-
There are five types of contracts : Service Contract Operation Contract Data Contract Message Contract Fault Contract Please refer be...
No comments:
Post a Comment