are retrieved, even when their values are the same. To explicitly specify that you want to retrieve identical rows, use the ALL option. If you want duplicates to be removed from the resultset, use the DISTINCT option. DISTINCTROW is a synonym for DISTINCT. See also COUNT DISTINCT and SELECT UNIQUE in Oracle mode. INTO ---- The INTO clause is used to specify that the query results should be written to a file or variable. * SELECT INTO OUTFILE - formatting and writing the result to an external file. * SELECT INTO DUMPFILE - binary-safe writing of the unformatted results to an external file. * SELECT INTO Variable - selecting and setting variables. The reverse of SELECT INTO OUTFILE is LOAD DATA. LIMIT ----- Restricts the number of returned rows. See LIMIT and LIMIT ROWS EXAMINED for details. LOCK IN SHARE MODE/FOR UPDATE ----------------------------- See LOCK IN SHARE MODE and FOR UPDATE for details on the respective locking clauses. OFFSET ... FETCH ---------------- MariaDB starting with 10.6 -------------------------- See SELECT ... OFFSET ... FETCH. ORDER BY -------- Order a resultset. See ORDER BY for details. PARTITION --------- Specifies to the optimizer which partitions are relevant for the query. Other partitions will not be read. See Partition Pruning and Selection for details. PROCEDURE --------- Passes the whole result set to a C Procedure. See PROCEDURE and PROCEDURE ANALYSE (the only built-in procedure not requiring the server to be recompiled). SKIP LOCKED ----------- MariaDB starting with 10.6 -------------------------- The SKIP LOCKED clause was introduced in MariaDB 10.6.0. This causes those rows that couldn't be locked (LOCK IN SHARE MODE or FOR UPDATE) to be excluded from the result set. An explicit NOWAIT is implied here. This is only implemented on InnoDB tables and ignored otherwise. SQL_CALC_FOUND_ROWS ------------------- When SQL_CALC_FOUND_ROWS is used, then MariaDB will calculate how many rows would have been in the result, if there would be no LIMIT clause. The result can be found by calling the function FOUND_ROWS() in your next sql statement. max_statement_time clause ------------------------- By using max_statement_time in conjunction with SET STATEMENT, it is possible to limit the execution time of individual queries. For example: SET STATEMENT max_statement_time=100 FOR SELECT field1 FROM table_name ORDER BY field1; WAIT/NOWAIT ----------- Set the lock wait timeout. See WAIT and NOWAIT. Examples -------- SELECT f1,f2 FROM t1 WHERE (f3<=10) AND (f4='y'); See Getting Data from MariaDB (Beginner tutorial), or the various sub-articles, for more examples. URL: https://mariadb.com/kb/en/select/https://mariadb.com/kb/en/select/