Wednesday 12 September 2012

Arithmetic Operation with Select Statement


Written By:- Isha Malhotra (Software Developer)
Email:-malhotra.isha3388@gmail.com.
Note: -if you find this article helpful then kindly leave your comment


For Asp.net Training with C# and Sql Server Click Here

We can perform following arithmetic operator with the select statement:-
1.       + ( this is use for addition)
2.       – (this is use for Subtraction)
3.       * (this is use for Multiplication)
4.       / (this is use for division which return quotient)
5.       % ( this is also use for division which return Remainder)

Following are the examples of select statement using arithmetic operation:-

Ø Add 1000 in the salary

select salary+1000 from employee;


Ø Calculate employee salary in which increase 25% of Salary

select salary+((salary*25)/100) from employee;

No comments:

Post a Comment