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 a cursor? : Sql dba
What is sql server and ase?
what are wild cards used in database for pattern matching ? : Sql dba
Can ddl statements be used in pl/sql?
What is meant by cursor in sql?
Can you have a foreign key without a primary key?
What are the types of subqueries?
How do you determine the current isolation level? : Transact sql
How many joins in sql?
which operator is used in query for pattern matching? : Sql dba
Name the operator which is used in the query for pattern matching?
Does mysql_real_escape_string prevent sql injection?
Is id a reserved word in sql?
What are types of joins?
Can you rollback after commit?