|
EMP |
ID |
Name |
Country |
Salary |
1 |
Vijay |
India |
6000 |
2 |
Bill |
USA |
8000 |
3 |
Kris |
France |
3000 |
|
SELECT Name,
Salary + 5 as 'Add',
Name + ', ' + Country as 'String Concatenation',
+Salary as 'Positive',
-Salary as 'Negative',
Salary - 5 as 'Subtract',
Salary / 5 as 'Divide',
Salary % 7 as 'Modulo',
Salary * 0.3 as 'Multiply'
FROM EMP
|
Output |
Name |
Add |
String Concatenation |
Positive |
Negative |
Subtract |
Divide |
Modulo |
Multiply |
Vijay |
6005 |
Vijay, India |
6000 |
-6000 |
5995 |
1200 |
1 |
1800 |
Bill |
8005 |
Bill, USA |
8000 |
-8000 |
7995 |
1600 |
6 |
2400 |
Kris |
3005 |
Kris, France |
3000 |
-3000 |
2995 |
600 |
4 |
900 |
|