https://dev.mysql.com/trigger-syntax.html
(Such a SET statement has no effect in an AFTER trigger because the row change will have already occurred.) In a BEFORE trigger, the NEW value for an AUTO_INCREMENT column is 0, not the sequence number that is generated automatically when the new ...
https://dev.mysql.com/using-innodb-tables.html
CREATE TABLE t5 (id INT AUTO_INCREMENT, b CHAR (20), PRIMARY KEY (id)); # The primary key can consist of more than one column. CREATE TABLE t6 (id INT AUTO_INCREMENT, a INT, b CHAR (20), PRIMARY KEY (id,a)); Although the table works correctly ... To ...
https://dev.mysql.com/binary-log-mixed.html
When one or more tables with AUTO_INCREMENT columns are updated and a trigger or stored function is invoked. The following system variables, when used with session scope (only), do not cause the logging format to switch: auto_increment_increment ...
https://dev.mysql.com/c-api-data-structures.html
This does not apply to NULL columns (because such columns have a default of NULL), or to AUTO_INCREMENT columns (which have an implied default value). This section describes C API data structures other than those used for prepared statements, the ...
https://dev.mysql.com/columns-table.html
The value is nonempty in these cases: auto_increment for columns that have the AUTO_INCREMENT attribute. The related ST_GEOMETRY_COLUMNS table provides information about table columns that store spatial data. The COLUMNS table has these columns: ...
https://dev.mysql.com/create-table-foreign-keys.html
MySQL supports foreign keys, which let you cross-reference related data across tables, and foreign key constraints, which help keep this spread-out data consistent. The index_name value is ignored if there is already an explicitly defined index on ...
https://dev.mysql.com/create-table-generated-columns.html
The AUTO_INCREMENT attribute cannot be used in a generated column definition. An AUTO_INCREMENT column cannot be used as a base column in a generated column definition. Values of a generated column are computed from an expression included in the ...
https://dev.mysql.com/create-table-select.html
For example: mysql> CREATE TABLE test (a INT NOT NULL AUTO_INCREMENT, -> PRIMARY KEY (a), KEY(b)) -> ENGINE=MyISAM SELECT b,c FROM test2; This creates a MyISAM table with three columns, a, b, and c. For example, the AUTO_INCREMENT attribute is not ... You can create one table from another by adding a SELECT statement at the end of the CREATE TABLE statement: CREATE TABLE new_tbl [AS] SELECT * FROM orig_tbl; MySQL creates new columns for all elements in the ...
https://dev.mysql.com/creating-spatial-indexes.html
The table also has an AUTO_INCREMENT column fid for storing object ID values. For InnoDB and MyISAM tables, MySQL can create spatial indexes using syntax similar to that for creating regular indexes, but using the SPATIAL keyword. For storage ...
https://dev.mysql.com/extensions-to-ansi.html
For example: mysql> SELECT col1=1 AND col2=2 FROM my_table; The LAST_INSERT_ID() function returns the most recent AUTO_INCREMENT value. MySQL Server supports some extensions that you probably will not find in other SQL DBMSs. Be warned that if you ...