Firebird Documentation Index → Firebird 2.1 Language Ref. Update → Data types and subtypes → BLOB data type |
Table of Contents
Find a more recent version at Firebird 5.0 Language Reference: Binary Data Types
Changed in: 2.1, 2.1.5
Description: Text BLOBs of any length and character set (including multi-byte sets) are now supported by practically every internal text function and operator. In a few cases there are limitations or bugs.
Level of support:
Full support for:
=
(assignment);
=
, <>
,
<
, <=
, >
,
>=
and synonyms (comparison);
||
(concatenation);
BETWEEN, IS [NOT] DISTINCT FROM, IN, ANY|SOME and ALL.
Support for STARTING [WITH], LIKE and CONTAINING:
In versions 2.1–2.1.4 (as well as 2.5) an error is raised if the second operand is 32 KB or longer, or if the first operand is a BLOB with character set NONE and the second operand is a BLOB of any length and character set.
In versions 2.1.5 and up (as well as 2.5.1 and up), each operand can be a BLOB of any length and character set.
SELECT DISTINCT, ORDER BY and
GROUP BY work on the BLOB ID, not the
contents. This makes them as good as useless, except that SELECT
DISTINCT weeds out multiple NULL
s, if present.
GROUP BY behaves oddly in that it groups together equal rows if
they are adjacent, but not if they are apart.
Any issues with BLOBs in internal functions and aggregate functions are discussed in their respective sections.
Changed in: 2.0
Description: In Firebird 2.0, several enhancements have been implemented for text BLOBs:
DML COLLATE clauses are now supported.
Equality comparisons can be performed on the full BLOB contents.
Character set conversions are possible when assigning a BLOB to a BLOB or a string to a BLOB.
When defining binary BLOBs, the mnemonic
binary
can now be used instead of the integer 0.
Examples:
select NameBlob from MyTable where NameBlob collate pt_br = 'João'create table MyPictures ( id int not null primary key, title varchar(40), description varchar(200), picture blob sub_type binary )
Firebird Documentation Index → Firebird 2.1 Language Ref. Update → Data types and subtypes → BLOB data type |