Contents Index Renaming columns in query results Computing values in the SELECT list

ASA SQL User's Guide
  Queries: Selecting Data from a Table
    The SELECT list: specifying columns

Character strings in query results


The SELECT statements you have seen so far produce results that consist solely of data from the tables in the FROM clause. Strings of characters can also be displayed in query results by enclosing them in single quotation marks and separating them from other elements in the select list with commas.

To enclose a quotation mark in a string, you precede it with another quotation mark.

For example:

SELECT 'The department''s name is' AS "Prefix",
   Department = dept_name
FROM department
Prefix Department
The department's name is R & D
The department's name is Sales
The department's name is Finance
The department's name is Marketing
The department's name is Shipping

Contents Index Renaming columns in query results Computing values in the SELECT list