What is the difference between correlated sub queries and
inner queries?
Answer Posted / vinay sir(datawarehousing tech
Guys,
First of all the question is not proper,it is supposed to
be "the difference between correlated sub queries and
simpe sub queries".
Corelated and Simple, both are Subqueries(having inner and
outer queries) but the way they execute is different.
Simple Subquery:Inner query executed first and then outer
query. Inner query executed only one time.
Corelated Sub query:Outer query is executed first and then
inner query.Outer query is executed many times.
Please find a common example where you can see the
execution difference.
Simple Subquery: select max(sal) from emp where sal not in
(select max(sal) from emp)
Corelated: Select a.sal from emp e where 1=(select count
(distinct(b.sal)) from emp b where a.sal<b.sal)
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What do you mean by teradata intellicloud?
Write a program to show the parser component used in teradata?
What is spool space? Why do you get spool space errors? How do trouble-shoot them?
What interface is used to connect to windows based applications?
What are the design features involved in teradata?
What is the purpose of indexes?
What are the various indexes in teradata? How to use them? Why are they preferred?
What are the things to be considered while creating secondary index?
Can you fastexport a field, which is primary key by putting equality on that key?
In Teradata, what is the significance of UPSERT command?
Which is more efficient group by or distinct to find duplicates?
Highlight the differences between Primary Key and Primary Index.
Mention a few of the ETL tools that come under Teradata.
List out teradata data types?
If a Node is busy what are the steps you can take to avoid ?