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


Please Help Members By Posting Answers For Below Questions

What is your daily office routine?

2346


If a cursor is open, how can we find in a pl/sql block?

1238


what are aggregate and scalar functions? : Sql dba

1129


Is primary key always clustered index?

1095


Do we need to rebuild index after truncate?

1138


what are the advantages of sql ? : Sql dba

1142


What is the current version of postgresql?

1178


How do I remove duplicates in two columns?

1187


define sql insert statement ? : Sql dba

1098


what is sql server agent? : Sql dba

1182


how to start mysql server? : Sql dba

1267


what is bcp? When does it used? : Sql dba

1056


Is primary key clustered index?

1019


Does group by remove duplicates?

1112


what are all the common sql function? : Sql dba

1131