关于BLOB 的SUB_TYPE的说明

When you define a BLOB column, you have the option of specifying a subtype. A BLOB
subtype is a positive or negative integer that describes the nature of the BLOB data
contained in the column. InterBase provides two predefined subtypes, 0, signifying that
a BLOB contains binary data, the default, and 1, signifying that a BLOB contains ASCII text.
User-defined subtypes must always be represented as negative integers. Positive integers
are reserved for use by InterBase.

Blob subtype Description
--------------------------------------------------------------------
0 Unstructured, generally applied to binary data or data of an indeterminate type
1 Text
2 Binary language representation (BLR)
3 Access control list
4 (Reserved for future use)
5 Encoded description of a table’s current metadata
6 Description of multi-database transaction that finished irregularly
--------------------------------------------------------------------
For example, the following statement defines three BLOB columns: BLOB1 with subtype 0
(the default), BLOB2 with InterBase subtype 1 (TEXT), and BLOB3 with user-defined
subtype –1:
CREATE TABLE TABLE2
(BLOB1 BLOB,
BLOB2 BLOB SUB_TYPE 1,
BLOB3 BLOB SUB_TYPE –1);

Published At
Categories with 数据库类
comments powered by Disqus