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
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
what is the difference between a web-garden and a web-farm? : Sql dba
Explain lock escalation? : Transact sql
What are transaction and its controls?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
what is a foreign key ? : Sql dba
How does sql*loader handles newline characters in a record? : aql loader
What is sql*plus?
Does sql*plus also have a pl/sql engine?
What is mutating trigger?
define sql insert statement ? : Sql dba
How global cursor can be declare with dynamic trigger ?
what are local and global variables and their differences? : Sql dba
What is sql scripting?