Search Results
https://dev.mysql.com/doc/refman/8.4/en/data-type-defaults.html
For nontransactional tables, an error occurs, but if this happens for the second or subsequent row of a multiple-row statement, the preceding rows are inserted. Suppose that a table t is defined as follows: CREATE TABLE t (i INT NOT NULL); In this ... Data type specifications can have explicit or implicit default ...
https://dev.mysql.com/doc/refman/8.4/en/example-foreign-keys.html
MySQL supports foreign keys, which permit cross-referencing related data across tables, and foreign key constraints, which help keep the related data consistent. A foreign key relationship involves a parent table that holds the initial column ...
https://dev.mysql.com/doc/refman/8.4/en/lock-tables.html
The LOCAL modifier enables nonconflicting INSERT statements (concurrent inserts) by other sessions to execute while the lock is held. (See Section 10.11.3, “Concurrent Inserts”.) However, READ LOCAL cannot be used if you are going to manipulate ... LOCK {TABLE | TABLES} tbl_name [[AS] alias] lock_type [, tbl_name [[AS] alias] lock_type] ...
https://dev.mysql.com/doc/refman/8.4/en/optimizing-innodb-bulk-data-loading.html
These performance tips supplement the general guidelines for fast inserts in Section 10.2.5.1, “Optimizing INSERT Statements”. When importing data into InnoDB, turn off autocommit mode, because it performs a log flush to disk for every insert.
https://dev.mysql.com/doc/refman/8.4/en/precision-math-expressions.html
In strict SQL mode, for INSERT into a column with an exact data type (DECIMAL or integer), a number is inserted with its exact value if it is within the column range. When retrieved, the value should be the same as what was inserted. (If strict SQL ... With precision math, exact-value numbers are used as given whenever ...
https://dev.mysql.com/doc/c-api/8.4/en/mysql-stmt-execute.html
Statement processing following mysql_stmt_execute() depends on the type of statement: For an UPDATE, DELETE, or INSERT, the number of changed, deleted, or inserted rows can be found by calling mysql_stmt_affected_rows(). int ...
https://dev.mysql.com/doc/refman/8.4/en/create-trigger.html
CREATE [DEFINER = user] TRIGGER [IF NOT EXISTS] trigger_name trigger_time trigger_event ON tbl_name FOR EACH ROW [trigger_order] trigger_body trigger_time: { BEFORE | AFTER } trigger_event: { INSERT | UPDATE | DELETE } trigger_order: { FOLLOWS | ...
https://dev.mysql.com/doc/refman/8.4/en/example-auto-increment.html
For example: INSERT INTO animals (id,name) VALUES(0,'groundhog'); If the column is declared NOT NULL, it is also possible to assign NULL to the column to generate sequence numbers. For example: INSERT INTO animals (id,name) VALUES(NULL,'squirrel'); ...You can also explicitly assign 0 to the column to generate sequence numbers, unless the NO_AUTO_VALUE_ON_ZERO SQL mode is ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-change-buffer.html
The buffered changes, which may result from INSERT, UPDATE, or DELETE operations (DML), are merged later when the pages are loaded into the buffer pool by other read operations. Figure 17.3 Change Buffer Unlike clustered indexes, secondary indexes ... The change buffer is a special data structure that caches changes to secondary index pages when those pages are not in the buffer ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-information-schema-metrics-table.html
Create a simple InnoDB table: mysql> USE test; Database changed mysql> CREATE TABLE t1 (c1 INT) ENGINE=INNODB; Query OK, 0 rows affected (0.02 sec) Enable the dml_inserts counter. row *************************** NAME: dml_inserts SUBSYSTEM: dml ...