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
Can we commit in trigger?
what are the limitations of identity column? : Transact sql
Can a primary key be a foreign key?
Mention what plvcmt and plvrb does in pl/sql?
How do I view a view in sql?
What is sql mysql pl sql oracle?
What is the use of stored procedures?
Why do we use triggers?
Define sql delete statement.
Enlist the advantages of sql.
What are different functions in sql?
What are the constraints available in sql?
Can a view be mutating? If yes, then how?
What is sql injection owasp?
Is sqlite thread safe?