Selecting Data

The SELECT statement is used for retrieving data from tables, for select specific data, often based on a criteria given in the WHERE clause.

Title Description
SELECT SQL statement used primarily for retrieving data from a MariaDB database.
Joins & Subqueries Documentation on the JOIN, UNION, EXCEPT and INTERSECT clauses, and on subqueries.
LIMIT Documentation of the LIMIT clause.
ORDER BY Order the results returned from a resultset.
GROUP BY Aggregate data in a SELECT statement with the GROUP BY clause.
Common Table Expressions Common table expressions are temporary named result sets
SELECT WITH ROLLUP Adds extra rows to the resultset that represent super-aggregate summaries
SELECT INTO OUTFILE Write the resultset to a formatted file
SELECT INTO DUMPFILE Write a binary string into file
FOR UPDATE Acquires a lock on the rows
LOCK IN SHARE MODE Acquires a write lock.
Optimizer Hints Optimizer hints There are some options available in SELECT to affect the ex...
PROCEDURE The PROCEDURE Clause of the SELECT Statement.
HANDLER Direct access to reading rows from the storage engine.
DUAL Dummy table name
SELECT ... OFFSET ... FETCH Allows one to specify an offset, a number of rows to be returned, and wheth...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/selecting-data/