Microsoft KB Archive/63238

{|
 * width="100%"|

INF: Creating NOT NULL Character Fields Without Padded Blanks

 * }

Q63238

-

The information in this article applies to:


 * Microsoft SQL Server for OS/2, version 4.2

-

For character fields defined as NOT NULL, the dbdatlen function returns the field width. The data is padded with blanks to the maximum width of the field. To create tables in SQL Server that will not blank-fill character fields for columns that require data, define the CHAR NOT NULL fields as VARCHAR NOT NULL. If you use VARCHAR, dbdatlen will return the length of the character string instead of the field width.

Keywords : kbprogramming

Issue type :

Technology : kbSQLServSearch kbAudDeveloper kbZNotKeyword3 kbSQLServ420OS2