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 a cursor? : Sql dba

561


What is sql server and ase?

543


what are wild cards used in database for pattern matching ? : Sql dba

552


Can ddl statements be used in pl/sql?

597


What is meant by cursor in sql?

548






Can you have a foreign key without a primary key?

510


What are the types of subqueries?

573


How do you determine the current isolation level? : Transact sql

584


How many joins in sql?

560


which operator is used in query for pattern matching? : Sql dba

547


Name the operator which is used in the query for pattern matching?

507


Does mysql_real_escape_string prevent sql injection?

539


Is id a reserved word in sql?

667


What are types of joins?

538


Can you rollback after commit?

532