SERIAL

Overview

This is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.

See also: Data Types in 10.6 ES, in 10.5 ES, and in 10.4 ES

EXAMPLES

CREATE TABLE serial_example (
  id SERIAL,
  data VARCHAR(32)
);
SHOW CREATE TABLE serial_example\G
*************************** 1. row ***************************
       Table: serial_example
Create Table: CREATE TABLE `serial_example` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data` varchar(32) DEFAULT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

CHANGE HISTORY

Release Series

History

10.6 Enterprise

  • Present starting in MariaDB Enterprise Server 10.6.4-1.

10.5 Enterprise

  • Present starting in MariaDB Enterprise Server 10.5.3-1.

10.4 Enterprise

  • Present starting in MariaDB Enterprise Server 10.4.6-1.

EXTERNAL REFERENCES