FirebirdSQL logo

VARBINARY

Data Type Declaration Format
{VARBINARY | BINARY VARYING} (length)
Table 1. VARBINARY Type Parameters
Parameter Description

length

Length in bytes between 1 and 32,765

VARBINARY is a variable-length binary type, and is an SQL standard-compliant alias for VARCHAR(length) CHARACTER SET OCTETS.

Note

Some tools may report the type as VARCHAR CHARACTER SET OCTETS instead of VARBINARY.

VARCHAR

Data Type Declaration Format
{VARCHAR | {CHAR | CHARACTER} VARYING} (length)
  [CHARACTER SET <set>] [COLLATE <name>]
Table 1. VARCHAR Type Parameters
Parameter Description

length

Length in characters.A valid length is from 1 to the maximum number of characters that can be accommodated within 32,765 bytes.

set

Character set name

name

Collation name

VARCHAR is a variable-length character data type, up to a maximum of 32,765 bytes.The stored structure is equal to the actual size of the data plus 2 bytes to record the length of the data.

All characters that are sent from the client application to the database are considered meaningful, including leading and trailing spaces.

Note
  • VARCHAR CHARACTER SET OCTETS has the alias VARBINARY

  • Formally, the COLLATE clause is not part of the data type declaration, and its position depends on the syntax of the statement.