Categories: Development

The SQLite3 data types

The handful of SQLite database column data types for storing, Unlike the vast amount of data types MySQL accommodates, SQLite only has 5 types.

A simpler and more refined approach to storing values.

The 5 data types for SQLite Storage are:

  • NULL: value can only be null.
  • INTEGER: A number value, aka an integer: 316
  • REAL: Float value: 12.50
  • TEXT: A text string: Lorum Ipsum example text
  • BLOB: The binary value of a complete object e.g an image.

These data types exclude data affinity types.

There is no CHAR, VARCHAR, DATETIME or TINYINT instead these get streamlined into TEXT and INTEGER respectively.

This means storing a date-time value must be done with the text type, which is essentially the VARCHAR type for SQLite.

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

2 years ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

2 years ago

FTP getting array of file details such as size using PHP

Using FTP and PHP to get an array of file details such as size and…

3 years ago

Creating Laravel form requests

Creating and using Laravel form requests to create cleaner code, separation and reusability for your…

3 years ago

Improving the default Laravel login and register views

Improving the default Laravel login and register views in such a simple manner but making…

3 years ago

Laravel validation for checking if value exists in the database

Laravel validation for checking if a field value exists in the database. The validation rule…

3 years ago