From the course: Querying Microsoft SQL Server 2019

Unlock the full course today

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

Column aliases

Column aliases - SQL Server Tutorial

From the course: Querying Microsoft SQL Server 2019

Start my 1-month free trial

Column aliases

- [Instructor] Table and column names in the database's design are not always going to be user friendly. You can have a different name displayed in the results of a SELECT query using the optional keyword AS. This will allow you to display an alias for the column name rather than the original name that the data table uses. For instances, let's pull information out of the Department table once again. We'll start by creating a new query. Just like before we'll start with the keyword SELECT and the name of the column that we want to pull. In this case I'm going to reference the Name column from the Department table. However, I do want to be more clear that the values displayed are the department names and not perhaps the name of the head employee of the department or the name of the building the department is in. I can do that by typing in SELECT Name and then the AS keyword followed by the text that I like the column to be…

Contents