©SQL :: Manager
HomeProgram InformationTechnical detailsFree downloadDonate for a cup of coffee
myway SQL Manager for MySQL and MariaDB, Download on Uptodown
MariaDB SEQUENCE, Management and editing

Management and editing of MariaDB sequences (SEQUENCE)

Sequences The sequence editing module can be reached by selecting Sequences of the database in the main menu
MySQL - Manage sequences

Module for managing and editing sequences in MariaDB databases from version 10.3:

Sequences in MariaDB are objects that generate a sequence of numeric values.

Sequences can be filtered alphabetically or by search.

Sequences can be selected for export or actions.

The list can be sorted by clicking on the field headings of the sequence list.

A backup archive is available.

There are also modules for viewing the sequence structure and editing rights.

Sequences refresh Reloads sequences menu and list.
Alphabetical selection Displays the menu for alphabetical selection of sequences.
Creating new sequences Starts form for creating new sequences.
Sequences search Searching in sequence names, with %... inside the sequence names.
Action module Displays the action module for selected sequences (Export, Save, Delete).
Export module Shows the export module for all sequences.
Backup creation scripts Saves the creation scripts of all sequences to the archive.
Script archive Shows the script archive.
Buttons in sequences list:
Edit: Opens the form for editing the sequence.
Script: Shows the creation script of the sequence in the SQL editor.
Download: Downloads the sequence generation script.
Delete: Deletes the sequence.
Icons in the table menu:
Sequence script Displays the sequence creation script in the SQL editor.
Sequence structure Displays the structure of the sequence.
Edit sequence Opens the form for editing the sequence.
MySQL - Sequence actions

Export and action module for selected sequences.

CREATE, CREATE IF NOT EXISTS, DROP & CREATE, CREATE OR REPLACE: Selection of the creation option for creation scripts of the sequences.

Filename: Filename for export files.

Append file name to individual files: The specified file name is also included in the individual file export.

Database name in file names: The database name is included in the file names.

GZIP compression: Files are exported or backed up GZip compressed.

Show selected sequences as text: The export file is shown as text in the SQL editor.

Download marked sequences in one file: Only one export file will be downloaded with the given name, which contains all scripts.

Download selected sequences as individual files: A separate export file is downloaded for each sequence.

Save marked sequences: Sequences are saved in the script archive of the MyWAY SQL Manager.

Delete selected sequences: Sequences are deleted from the MySQL server (DROP).

Invert Selection: Inverts the selection markers.

MySQL - Sequences export

Export module for all sequences.

CREATE, CREATE IF NOT EXISTS, DROP & CREATE, CREATE OR REPLACE: Selection of the creation option for creation scripts of all sequences.

Filename: Filename for export files of all sequences.

Append file name to individual files: The specified file name is also included in the individual file export.

Database name in file names: The database name is included in the file names.

GZIP compression: Files are exported or backed up GZip compressed.

Show all sequences as text: The export file is shown as text in the SQL editor.

Download all sequences in one file: Only one export file with the given name containing all scripts will be downloaded.

Download all sequences as individual files: A separate export file is downloaded for each sequence.

MySQL - Sequences menu

Labeled menu by double-clicking title bar.

MariaDB at version 10.3 introduced support for sequences, which are objects used to generate a sequence of numeric values. Sequences provide an alternative approach to automatically incrementing columns to generate unique values. Sequences are commonly used when there is a need to generate unique identifiers for tables, or to control the order of generated values ​​independent of table inserts. A sequence in MariaDB is created with the CREATE SEQUENCE statement, specifying the name of the sequence and optional parameters like start value, min value, max value and increment.

The next value can be retrieved from a sequence using the NEXT VALUE FOR expression. This expression returns the next value in the sequence without changing the sequence itself. MariaDB provides several sequence-related functions, including NEXTVAL, LASTVAL and SETVAL. These functions are used to get the next or last value generated by a sequence. SETVAL can be used to set the next value to be returned from a sequence.

Sequences in MariaDB provide a flexible and efficient way to generate unique numeric values. They are particularly useful in scenarios where control over the order of generated values ​​is needed or identifiers need to be generated independently of table inserts.
Sequence functions

NEXTVALNEXTVAL(Sequence)
Generates and returns the next value in a sequence. Synonym for NEXT VALUE FOR sequence.
More about NEXTVAL Function

LASTVALLASTVAL(Sequence)
Returns the last value in a current connection generated in a sequence. Synonym for PREVIOUS VALUE FOR sequence.
More about LASTVAL Function

SETVALSETVAL(Sequence, Value, [Reserved], [Cycle])
Sets and returns the next value to be returned from a sequence.
More about SETVAL Function

For more information on sequences, see: mariadb.com
Updated: 2023-09-15ImprintContactTerms & conditionsPrivacy & CookiesUpdatesSitemapFacebookLinkedinTwitterStatistics©2020-2024 Heino Cunze-Fischer