Friday, June 1, 2012

SQL Alias

With SQL, an alias name can be given to a table or to a column.


SQL Alias Syntax for Table
SELECT * FROM table_name AS alias_name


Example: SELECT * FROM Employee as EE  -- So that we can refer this table as EE to the continued scripts


SQL Alias Syntax for Columns
SELECT column_name AS alias_name FROM table_name

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.