adspace


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


Please Help Members By Posting Answers For Below Questions

what is dbms? : Sql dba

1061


What is your daily office routine?

2345


what is sql server agent? : Sql dba

1182


Is primary key clustered index?

1018


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2090


how many tables will create when we create table, what are they? : Sql dba

1144


define sql insert statement ? : Sql dba

1098


Can we use distinct and group by together?

1133


what are the advantages of sql ? : Sql dba

1141


Do we need to rebuild index after truncate?

1137


what is schema? : Sql dba

1146


How do I remove duplicates in two columns?

1184


Is inner join faster than left join?

1274


how to escape special characters in sql statements? : Sql dba

1113


Does group by remove duplicates?

1112