Rearranging the column order  Using expressions

Chapter 2: Queries: Selecting Data from a Table

Renaming columns in query results

When query results display, the default heading for each column is the name given to it when it was created. You can rename a column heading for display purposes by using one of the following instead of only the column name in a select list.

This provides a substitute name for the column. For example, to change pub_name to “Publisher” in the previous query, type any of the following statements:

The results of these statements look like this:

Publisher                 pub_id 
----------------------    ------ 
New Age Books             0736 
Binnet & Hardley          0877 
Algodata Infosystems      1389 
 
(3 rows affected)




Copyright © 2005. Sybase Inc. All rights reserved. Using expressions

View this book as PDF