|
|
Archives of the TeradataForum
Message Posted: Fri, 12 Aug 2005 @ 09:17:45 GMT
Subj: | | Re: ROWID based join! |
|
From: | | Dieter Noeth |
S.Aananth wrote:
| I was being interviewd yesterday and the interviewer put to me these 2 questions which baffled me. I just thought may be he IS right under
certain circumstances. Can someone help? | |
| 1. Find avg sal by dept. -- I said -> sel avg(sal) from emp group by deptno. He insisted that deptno would have to be selected in the
select clause else an error will b thrown. I just tested it after coming back home and it did work!! Are there specific conditions where it
wouldnt -- like will work in BTET and not in ANSI or BTEQ & SQLA etc?? | |
Your answer was correct, you don't have to specify the group by columns within select list in Teradata SQL. But of course the result set will
be useless if the department number is missing :-)
| 2. What is a ROWID based join? - I've come across rowhash based and rowkey based join -- but what is a ROWID based join? I just
sifted thru the materials i've got and tried some explain but couldnt find out. Is there such a join - anyone? | |
SQL Reference
Statement and Transaction Processing
Chapter 2: Query Optimization
RowID Join
Dieter
| |