Quantcast
Viewing all articles
Browse latest Browse all 16

Expression as column in SQL Query

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.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 16

Trending Articles