views:

327

answers:

5

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?

+9  A: 

I have always seen it called an alias.

Edit: Yeap!

Patrick Harrington
+2  A: 

They also call it a "Correlation Name"

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/db2/rbafzmstc2cornm.htm

S.Lott
A: 

I think the correct name is table-alias

James Anderson
+1  A: 

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 )

That's not correct. The term correlation name is used whether or not you have a correlated subquery.
Bill Karwin
+1  A: 

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