2

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?

Patrick Harrington
  • 47,416
  • 5
  • 23
  • 20

5 Answers5

9

I have always seen it called an alias.

Edit: Yeap!

Patrick Harrington
  • 47,416
  • 5
  • 23
  • 20
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
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
0

I think the correct name is table-alias

James Anderson
  • 27,109
  • 7
  • 50
  • 78