SQL Evi  
Wednesday, March 10, 2010
 
Aga Download, Aga Msn, Aga Oyun, Garavel, ASP Rehberi, ASP Indir, Bekir Topuz, Erinç Kuzu, Kartuş Marketi, SQL Evi - House
 
SQL Aliases  
HomeSQL Aliases  
SQL aliases can be used with database tables and with database table columns, depending on task you are performing  

SQL aliases can be used with database tables and with database table columns, depending on task you are performing.

SQL column aliases are used to make the output of your SQL queries easy to read and more meaningful:


SELECT Employee, SUM(Hours) As SumHoursPerEmployee
FROM EmployeeHours
GROUP BY Employee

In the example above we created SQL alias SumHoursPerEmployee and the result of this SQL query will be the following:

Employee SumHoursPerEmployee
John Smith 25
Allan Babel 24
Tina Crown 27

Consider the following SQL statement, showing how to use SQL table aliases:


SELECT Emp.Employee
FROM EmployeeHours AS Emp

Here is the result of the SQL expression above:

Employee
John Smith
Allan Babel
Tina Crown

The SQL table aliases are very useful when you select data from multiple tables.

 
 
 
 
HomeSQL Aliases Top  
 
Hosted By Speed Layer
© 2009 SQL Evi