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
How to run a query in teradata?
what is sysdba and sysdbc ? which has high priority ?
What is difference between user and database in teradata?
How can bottlenecks be identified?
What are the 5 phases in a multiload utility?
What are the primary characteristics of the Teradata.
Define views in teradata with syntax.
How will you solve the problem that occurs during update?
What are differences between teradata and ansi session modes in teradata?
Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!
What happens in a conflict? How do you handle that?
Explain PDE.
Explain the term 'row' related to relational database management system?
What are the steps to create a data model?
Explain how spool space is used.