1.1.1

Table Of Contents
BinaryADO.NET mapped System.Data.Dbtype
DbDataReader.GetBytesADO.NET getter
Syntax in CREATE TABLE
{ BLOB | BINARY LARGE OBJECT } [ ( length [{ K | M | G }] ) ]
The length of the BLOB is expressed in number of bytes by default. The sufxes K, M, G stand for kilobyte,
megabyte and gigabyte respectively.
Example
CREATE TABLE blob_data(id INT primary key, data BLOB(10M));
- search for a blob
select length(data) from blob_data where id = 100;
CHAR
Provides for xed-length strings. If a string value is shorter than the expected length, then spaces are inserted
to pad the string to the expected length. If a string value is longer than the expected length, then any trailing
blanks are trimmed to make the length same as the expected length, while an exception is raised if characters
other than spaces are required to be truncated. For comparision operations, the shorter CHAR string is padded
with spaces to the longer value. Similarly when mixing CHARs and VARCHARs in expressions , the shorter
value is padded with spaces to the length of longer string.
To represent a single quotation mark within a string, use two quotation marks:
VALUES 'going to Chandra''s place'
The length of CHAR is an unsigned integer constant.
java.lang.StringEquivalent Java type
java.lang.Integer.MAX_VALUE (2147483647 )Maximum length
1Default length
java.sql.Types.CHARJDBC metadata type
ResultSet.getString, PreparedStatement.setStringJDBC methods
System.StringEquivalent .NET type
Vmware.Data.SQLFire.SQLFType.CharADO.NET metadata type
StringFixedLengthADO.NET mapped System.Data.Dbtype
DbDataReader.GetStringADO.NET getter
Syntax in CREATE TABLE
CHAR[ACTER] [(length)]
CHAR FOR BIT DATA
Provides for xed-length byte strings. This is used when CHAR type is not appropriate due to unstructured data
or otherwise. If a value is shorter than the expected length, then it is padded with 0x20 byte values. No padding
is performed for comparisons between CHAR FOR BIT DATA and VARCHAR FOR BIT DATA types as per
SQL-92 standard (this is different from the way some DBMSs behave). An operation involving a VARCHAR
FOR BIT DATA and CHAR FOR BIT DATA yields a value of type VARCHAR FOR BIT DATA.
625
SQL Language Reference