From the course: Oracle Database 12c: Basic SQL
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using column aliases - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
Using column aliases
- [Narrator] We can add column aliases which is a fancy name of saying labels to the output of our SQL query. For example, in the query we have executed in our previous video, we have generated two new calculated columns. Salary after bonus and a bonus column. Note that the actual header value, the column name for both of these columns is not very readable or legible. We can change that by assigning a column alias to be used in the query output. We do that using the AS keyword followed by the new column alias value. So I can type AS and in double quotation marks, type salary plus bonus. And for the second calculated column, I can type AS bonus. Running this query again will generate more legible column names. I can also do that for columns that exist in the Employees table itself. And not just for columns whose values are generated based on calculations. So for example, instead of first_name, I can type AS…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Writing your first SELECT query1m 56s
-
(Locked)
Selecting only specific columns2m 22s
-
(Locked)
Using WHERE to filter specific rows1m 55s
-
(Locked)
Using multiple WHERE conditions3m 55s
-
(Locked)
Using WHERE to filter partial strings3m 12s
-
(Locked)
Using WHERE to filter numeric ranges1m 17s
-
(Locked)
Using WHERE IN and NOT IN for strings1m 54s
-
(Locked)
Using WHERE IN and NOT IN for numbers1m 35s
-
(Locked)
Using WHERE to filter dates2m 42s
-
(Locked)
Using WHERE to filter exact strings1m 55s
-
(Locked)
Using DISTINCT to eliminate duplicates4m
-
(Locked)
Performing basic numeric calculations2m 23s
-
(Locked)
Using column aliases2m 18s
-
(Locked)
Describe the structure of a table3m 16s
-
(Locked)
Using ORDER BY3m 29s
-
-
-
-
-
-
-