Get startedGet started for free

Aliasing

Default column names in an SQL result set come from the fields used to create them. You can use aliasing to rename these columns. This is helpful for making it clear what the column is about.

This exercise is part of the course

Introduction to SQL

View Course

Exercise instructions

  • Add an alias to the SQL query to rename the author column to unique_author in the result set.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

-- Alias author so that it becomes unique_author
SELECT DISTINCT author ___
FROM books;
Edit and Run Code