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.
Latihan ini adalah bagian dari kursus
Introduction to SQL
Petunjuk latihan
- Add an alias to the SQL query to rename the
authorcolumn tounique_authorin the result set.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
-- Alias author so that it becomes unique_author
SELECT DISTINCT author ___
FROM books;