NEXTVAL()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Generate the next value in a sequence.
EXAMPLES
CREATE SEQUENCE seq START WITH 1 INCREMENT BY 1;
SELECT SETVAL(seq, 1);
+----------------+
| SETVAL(seq, 1) |
+----------------+
| 1 |
+----------------+
SELECT NEXTVAL(seq);
+--------------+
| NEXTVAL(seq) |
+--------------+
| 2 |
+--------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.