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
Is sql open source?
How do I send sql query results to excel?
How many indexes can be created on a table in sql?
Explain the purpose of %type and %rowtype data types?
what are the authentication modes in sql server? : Sql dba
What's the procedure?
What jobs use sql?
Why sql query is slow?
what is the difference between primary key and unique key? : Sql dba
What are the types of subqueries?
Why is sql important?
Which is better join or inner query?
how are mysql timestamps seen to a user? : Sql dba
what happens if null values are involved in expressions? : Sql dba
Which join is like inner join?