O'Reilly logo

Oracle SQL: A Beginner’s Tutorial by Djoni Darmawikarta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3

Query Output

All the queries in Chapter 2, “Basic Queries” returned rows that contained columns from the source table. However, output rows can also contain string or numeric expressions that include string or numeric literals, operators, and functions.

In this chapter you learn how to manipulate query output using expressions and how to order and store output rows into a table.

Column Aliases

By default the names of the output columns in the query output are the names of the columns of the queried table. However, you don’t have to be stuck with the original column names. You can give them different names or aliases if you wish.

The syntax for the SELECT clause that uses aliases is as follows.

 

SELECT column_1 AS alias1, column_2 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required