Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (Français) » SQL Anywhere Server - SQL Usage » Querying and modifying data » Querying data » The select list: Specifying columns


Character strings in query results

Most SELECT statements produce results that consist solely of data from the tables in the FROM clause. However, 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",
   DepartmentName AS Department
FROM Departments;
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