faqts : Computers : Databases : MySQL : Shell Commands : mysql

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 7 people (71%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

Can columns be given an alias? A table with 4 authors per row to match a table of one author row. So one column matches any of 4 columns.

Nov 3rd, 2000 08:23
Narendra Jain, Meghan Arbogast,


Yes, you can call the resultant columns with the names you want to call
them as (known as alias). Please note that later on in your program, you
will have to use the alias names and not the original column names.
The syntax is:
select author as author1, author as author2, author as author3
from author_table
where ...
Hope this helps...
Narendra Jain