From the course: Database Foundations: Intro to Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Display column aliases with AS

Display column aliases with AS

From the course: Database Foundations: Intro to Databases

Start my 1-month free trial

Display column aliases with AS

- When you're writing database queries, you're not limited to displaying the data exactly as it's stored in the database. You can repurpose the data by applying calculations, functions, groupings, and other types of manipulations in order to meet the needs of whatever analysis you're after. Because the data returned in a result set can be modified, it's important to make sure that the column names that are displayed are accurate to the final calculation or the data manipulation. You can also rename the columns just to clarify their contents or to simply make them more legible. You do all of this by naming the output columns with an alias, using the AS keyword. On the screen, I have the contents of a script called AS_Start.sql that you can find inside of the Chapter 7 folder. This query will join some columns from our two tables. And when I press the Run button, you'll see the results. Here I can see that we have the…

Contents