While we have demonstrated that we can retrieve data from our Companylink
database, we have not, thus far, been able to alter the way the data is presented. As we move through the book, we will discover more ways to customize our output, but one way we can do this now is through the use of an alias. An alias is an alternate name given to a column that alters the way it is displayed. To demonstrate this, let's examine another one of our Companylink
tables: the award
table. The following example shows a query from the award
table that selects its two columns but uses no alias:
For the first time, we turn our attention to a portion of the output other than the data. Notice how the column headers, AWARD_ID and AWARD_DESC, are named exactly as the column names themselves. Of course, this is to be expected, but what if we wanted to change the column headers to something more descriptive? To do this, we simply use an alias for the columns, as...