How many levels can subqueries be nested in a FROM clause?
Answer Posted / slokh
FROM clause
A subquery can also be found in the FROM clause. These are
called inline views.
For example:
select suppliers.name, subquery1.total_amt
from suppliers,
(select supplier_id, Sum(orders.amount) as total_amt
from orders
group by supplier_id) subquery1,
where subquery1.supplier_id = suppliers.supplier_id;
In this example, we've created a subquery in the FROM
clause as follows:
(select supplier_id, Sum(orders.amount) as total_amt
from orders
group by supplier_id) subquery1
This subquery has been aliased with the name subquery1.
This will be the name used to reference this subquery or
any of its fields.
Limitations:
Oracle allows an unlimited number of subqueries in the FROM
clause.
| Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
What is full join in sql?
What is the difference between microsoft access and sql server?
What is restrict in sql?
How many types of cursors are available in pl/sql?
how many ways to get the current time? : Sql dba
How can you get sql*loader to commit only at the end of the load file? : aql loader
How is indexing done in search engines?
What is number function in sql?
Is sql easier than java?
What are tuples in sql?
What is a trigger word?
Why stored procedures are faster than query?
Can we insert in sql function?
Explain the difference between 'between' & 'and' operators in sql
What can I use instead of union in sql?