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
Explain the types of join supports by teradata?
What is spool space and when running a job if it reaches the maximum spool space how you solve the problem?
How do you set the session mode parameters in bteq?
Highlight the advantages of PPI(Partition Primary Index).
What is called partitioned primary index (ppi)?
What is the basic syntax for teradata select statement?
Can we have two time dimensions in a schema(either star or snow flake)? For ex if we want joining date of employee and if we want today's sales with time whether can we have two time dimensions for accommodating above tasks?
What is the difference between teradata and basic rdbms?
What are differences between teradata and ansi session modes in teradata?
Where is teradata rdbms used?
Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!
What are the scenarios in which full table scans occurs?
Explain the term 'primary key' related to relational database management system?
What is the function of parser component in teradata?
Backup Script was blocked you are unable to archive the data now. how do you analyze it and where do you identify ?