The SELECT statements in the examples you've seen so far produce results that consist of data from the tables listed in the FROM clause. Character strings can also be displayed in query results.
To display a character string in a results set, enclose the entire string in single quotation marks and separate it from other elements in the select list with commas:
SELECT 'The publisher''s name is', Publisher = pub_name FROM publishers
Publisher |
--------------------------------------------- |
The publisher's name is New Moon Books |
The publisher's name is Binnet & Hardley |
The publisher's name is Algodata Infosystems |
The publisher's name is Five Lakes Publishing |
The publisher's name is Ramona Publishers |
The publisher's name is GGG&G |
The publisher's name is Scootney Books |
The publisher's name is Lucerne Publishing |
(8 row(s) affected)