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
-
Below is indexer declaration : modifier return type this [argument list] { get { // Get codes goes here } set { // Set codes goes h...
-
1. An indexer is identified by it's signature. But a property is identified it's name. 2. An indexer is always an instance member,...
-
You can add public events for Httpmodule using below syntax i.e ModuleName_OnEventName in Global.asax . Example Session_OnStart ( Obj...
-
The steps to create custom HTTP module are : Implement IHttpModule Interface Handle Init Method and register events one needs Handle t...
-
Use a delegate when: An eventing design pattern is used. • It is desirable to encapsulate a static method. The caller has no need access o...
-
Please do below steps to make SQLServer session mode to work properly : 1. To use SQLServer mode, you must first be sure the ASP.NET sessi...
-
Different access modifiers/specifiers in C# : Public - Any class or assembly can access Protected - Access is limited to the containing ...
-
Replication is the way to keep data synchronised in multiple datbases. SQL Replication consists of two important part : Publisher - Datab...
-
OOPs concepts that C# supports are : Abstraction : is a process that involves identifying the crucial behavior of an object and eliminatin...
-
public class Operation { public int Add ( int a , int b ) { return (a+b); } } We have to call above method using delegate Steps below : D...
No comments:
Post a Comment