0% found this document useful (0 votes)
14 views1 page

Adbase Rebiewer2

Uploaded by

axremolin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Adbase Rebiewer2

Uploaded by

axremolin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

AdBase REVIEWER 2 the condition

ADVANCED SQL
A. Common Table Expression - specifies F. CORRELATED SUBQUERIES - select
a temporary named result set. data from a table reference in the outer
- uses WITH operator. query.
- can be referenced within another - cannot be executed independently as
SELECT, INSERT, UPDATE, or DELETE simple subquery.
STATEMENT. - executed repeatedly, once for each row
- ORDER BY, INTO, OPTION cannot be evaluated by the outer query.
used. G. EXISTS operator - CHECK whether a
subquery PRODUCES any rows of query
TYPES OF CTE results.
A. Non-recursive CTE - commonly used in correlated
- easier to understand subqueries.
- does not use loops/recursion
B. Recursive CTE
- uses recursion
- useful for hierarchical data, CTE
continues until query returns the entire
hierarchy.

Subqueries - a query (SELECT


statement) inside another query.
- expressed inside parentheses.
- FIRST QUERY IN SQL - outer query
- QUERY INSIDE - inner query, executed
first
- output of inner query is used as INPUT
for outer query

A. WHERE clause - part of row selection


process
- also called NESTED SUBQUERIES
B. FROM clause - return temporary or
virtual table.
C. SELECT clause - subquery nested in
another SELECT statement.
D. IN operator - match one item from any
in the list.
E. ALL and ANY operator
ANY - returns TRUE if ANY of the
subqueries SATISFY the condition
ALL - return TRUE if ALL subquery MEET

You might also like