SQL SELECT: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 14: Line 14:


Select all (possibly across multiple tables) then filter and discard with where.
Select all (possibly across multiple tables) then filter and discard with where.
=Example=
<syntaxhighlight lang='sql'>
SELECT id, name FROM person WHERE id = ;
</syntaxhighlight>


=Clauses=
=Clauses=

Revision as of 22:55, 22 May 2024

Internal

Overview

Upon execution, an SQL query returns a result set.

Query execution. SQL optimizer. Subqueries.

SELECT FROM WHERE GROUP BY HAVING ORDER BY 

Select all (possibly across multiple tables) then filter and discard with where.

Example

SELECT id, name FROM person WHERE id = ;

Clauses

FROM

FROM permanent|derived|temporary|virtual(view)

Table alias.

Querying Multiple Tables

Querying Multiple Tables

WHERE

The WHERE Clause

GROUP BY ... HAVING

(make sure I understand thoroughly and link)

ORDER BY

Subqueries