Friday, April 13, 2012

Subqueries

What is ROWNUM and ROW_NUMBER ?

- ROWNUM is a pseudocolumn which is the number assigned to each row retrieved.
- ROW_NUMBER is an analytic function which does something similar, but has all the capabilities of PARTITION BY and ORDER BY clauses..


What is an inline view?

- It's not a schema object
- It's a subquery in the FROM clause with an alias that can be used as a view within the SQL statement.

What are Nested and Correlated subqueries ?

- The subquery used in WHERE clause is a nested subquery.
- If this subquery refers to any column in the parent statement, it becomes a correlated subquery.
Related Posts Plugin for WordPress, Blogger...