3. Understanding SQL Data Types : SQL Data Types : Character Data Types : Text Data Types
 
Share this page                  
Text Data Types
All ASCII characters except the null character (\0) are allowed within text strings. Null characters are converted to blanks.
Blanks are only ignored when text strings are compared with C data. Unlike varchar, if the strings are unequal in length, blanks are not added to the shorter string. For example, assume that the following text strings are being compared:
'abcd'
and
'abcd '
The string 'abcd  ' is considered greater than the string 'abcd' because it is longer.
Note:  Varchar is the preferred varying length character type. Text is supported for backward compatibility.