Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateData types and subtypes → BLOB data type
Firebird Home Firebird Home Prev: BIGINT data typeFirebird Documentation IndexUp: Data types and subtypesNext: New character sets

BLOB data type

Text BLOB support in functions and operators
Various enhancements

Text BLOB support in functions and operators

Changed in: 2.1

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.

  • Partial support for STARTING [WITH], LIKE and CONTAINING: an error is raised if the second argument is 32 KB or longer.

  • 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 NULLs, 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.

Various enhancements

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
)
Prev: BIGINT data typeFirebird Documentation IndexUp: Data types and subtypesNext: New character sets
Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateData types and subtypes → BLOB data type