create alias in mysql

by Ramya 2012-05-18 12:42:49

create alias in mysql

alias is a short name used in mysql to shorten the query. it is used as "AS" in mysql query.
for eg,
SELECT SUM(*) AS cnt from test


you can also use it in multiple table select query.for eg,
SELECT a.cId, b.id FROM test AS a, user AS b WHERE a.cId=b.id

Tagged in:

677
like
0
dislike
0
mail
flag

You must LOGIN to add comments