When I use A.column name, B.Column name where A = Table A and B = Table B , what is the technical name for the A.Column name? Is it a prefix, identifier or what else?
Asked
Active
Viewed 822 times
5 Answers
2
They also call it a "Correlation Name"
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmstc2cornm.htm

S.Lott
- 384,516
- 81
- 508
- 779
1
I think correlation
name is properly the alias used in a correlated subquery
.
In the query below E2 is the correlation
name.
SELECT EMPNO, LASTNAME, WORKDEPT, EDLEVEL
FROM EMPLOYEE
WHERE EDLEVEL >
(SELECT AVG(E2.EDLEVEL)
FROM EMPLOYEE **E2**
WHERE E2.WORKDEPT = WORKDEPT
)

Sabyasachi Mishra
- 1,677
- 2
- 31
- 49
-
That's not correct. The term correlation name is used whether or not you have a correlated subquery. – Bill Karwin Dec 17 '08 at 16:48
1
From my copy of "SQL-99 Complete, Really":
A
<Correlation name>
(or alias) identifies a variable that ranges over some Table; that is, a variable whose only permitted values are the rows of a given Table.
So either "alias" or "correlation name" is acceptable. Though "alias" is also used for column aliases defined in the select-list, so if you use this term you should be clear about which one you mean.

Bill Karwin
- 538,548
- 86
- 673
- 828