Quantcast
Channel: Geeks Tutor
Viewing all articles
Browse latest Browse all 15

Expression as column in SQL Query

$
0
0

You can write an expression and place it in the SELECT list of a SQL Query. For example , you want to display the Total Leaves available for the user from the Employee table. Total Leaves in this case can be VacationHours + SickLeaveHours. Below is the Query include the expression as column and display the results. SELECT VacationHours + SickLeaveHours AS Leaves FROM HumanResources.Employee;

The post Expression as column in SQL Query appeared first on Geeks Tutor.


Viewing all articles
Browse latest Browse all 15

Trending Articles