Data types overview
A table showing all the combinations of the 'type' and 'size' fields of a column specification along with underlying database data types.
Serial
Serial is a self-incrementing Integer data type
Integer
This field type is used for storing integers, such as node IDs and user IDs.
Float
Floating point numbers are stored using the float data type.
Decimal (Numeric)
The numeric data type allows us to specify the precision and scale of a number.
Text
Text data type is used to store quite large textual data, for example, the body field of a node.
Varchar
The Varchar type is the most frequently used field type for storing text less than 256 characters in length.
Char
Char fields are fixed-length character fields. The length of the field, in characters, is defined by the length key.
Blob
The binary large object data (blob) type is used to store binary data (for example, Drupal’s cache table to store the cached data).
Encoding, Collation and Storage
A Crash course on Character encoding, Collation and Storage Engines
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.