https://dev.mysql.com/type-conversion.html
For example, if a subquery returns an integer to be compared to a DATETIME value, the comparison is done as two integers. The arguments are compared as decimal values if the other argument is a decimal or integer value, or as floating-point values ... When an operator is used with operands of different types, type conversion occurs to make the operands ...
https://dev.mysql.com/version-tokens-installation.html
To avoid this overhead, do not install it unless you plan to use it. This section describes how to install or uninstall Version Tokens, which is implemented in a plugin library file containing a plugin and user-defined functions (UDFs). For general ...
https://dev.mysql.com/writing-password-validation-plugins.html
The validate_password_descriptor value in the general descriptor points to the type-specific descriptor. The server checks interface_version when it loads the plugin to see whether the plugin is compatible with it. For password-validation plugins, ... This section describes how to write a server-side password-validation ...
https://dev.mysql.com/calculating-days.html
CREATE TABLE t1 (year YEAR(4), month INT UNSIGNED, day INT UNSIGNED); INSERT INTO t1 VALUES(2000,1,1),(2000,1,20),(2000,1,30),(2000,2,2), (2000,2,23),(2000,2,23); The example table contains year-month-day values representing visits by users to the ... The following example shows how you can use the bit group functions to calculate the number of days per month a user has visited a Web ...
https://dev.mysql.com/condition-pushdown-optimization.html
In all of the cases in the preceding list, it is possible for the condition to be converted into the form of one or more direct comparisons between a column and a constant. This optimization improves the efficiency of direct comparisons between a ...
https://dev.mysql.com/converting-tables-to-innodb.html
Thus, take care to avoid transactions that run for too long: If you are using a mysql session for interactive experiments, always COMMIT (to finalize the changes) or ROLLBACK (to undo the changes) when finished. Close down interactive sessions ...
https://dev.mysql.com/create-table-secondary-indexes.html
JSON columns and indirect indexing in NDB Cluster It is also possible to use indirect indexing of JSON columns in MySQL NDB Cluster, subject to the following conditions: NDB handles a JSON column value internally as a BLOB. A secondary index defined ...
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. This is done intentionally to make the statement ... 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/create-view.html
To create the view explicitly in a given database, use db_name.view_name syntax to qualify the view name with the database name: CREATE VIEW test.v AS SELECT * FROM t; Unqualified table or view names in the SELECT statement are also interpreted with ...If the view does not exist, CREATE OR REPLACE VIEW is the same as CREATE ...
https://dev.mysql.com/cursors.html
Cursors have these properties: Asensitive: The server may or may not make a copy of its result table Read only: Not updatable Nonscrollable: Can be traversed only in one direction and cannot skip rows Cursor declarations must appear before handler ...