Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

column alias 1

Status
Not open for further replies.

teser

Technical User
Mar 6, 2001
194
US
How can I create an alias on my SQL:

I tried -
select data as dataalias from table;

Any suggestions?
 
Don't use the "as" statement:

SELECT MyTable.MyField1 LastName,
MyTable.MyField2 FirstName
FROM MyTable Terry M. Hoey
 
Another select method:

SELECT column AS "column alias" FROM table;

where
a) column is your target column
b) column alias is your target column alias, you must have " at the begin and end of this alias.
c) table is your target table.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top