adspace
what is the difference between the query and corelated
query
Answer Posted / amar_kondla
select * from emp----- is a query;
and
co-related query is sub one of sub qury( sub qury
means--whose returning values are filtering the condition
of the main query)
ex; SELECT * FROM EMP E
WHERE E.SAL>( SELECT AVG(SAL) FROM EMP F
WHERE E.DEPTNO= F.DEPTNO);
SO HERE WE R FINDING THE EMPLOYEE WHO HAS GETTING MORE THAN
AVG(SAL) OF RESPECTING DEPTNO.
AND CO RELATED SUB QUERY ALWAYS USE ALIAS NAME FOR TABLE, IT
SIMILAR LIKE JAIN(SELF JOIN)
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What is your daily office routine?
If a cursor is open, how can we find in a pl/sql block?
what are aggregate and scalar functions? : Sql dba
Is primary key always clustered index?
Do we need to rebuild index after truncate?
what are the advantages of sql ? : Sql dba
What is the current version of postgresql?
How do I remove duplicates in two columns?
define sql insert statement ? : Sql dba
what is sql server agent? : Sql dba
how to start mysql server? : Sql dba
what is bcp? When does it used? : Sql dba
Is primary key clustered index?
Does group by remove duplicates?
what are all the common sql function? : Sql dba