0% found this document useful (0 votes)
0 views

14 SQL – Types of Operators in SQL

The document outlines various types of SQL operators, including arithmetic, comparison, logical, bitwise, set, string, and other operators. It provides examples of arithmetic operators with their descriptions and results, along with SQL queries to calculate bonuses and annual salaries. The queries demonstrate how to retrieve employee data and perform calculations on salaries.

Uploaded by

itmanarif
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

14 SQL – Types of Operators in SQL

The document outlines various types of SQL operators, including arithmetic, comparison, logical, bitwise, set, string, and other operators. It provides examples of arithmetic operators with their descriptions and results, along with SQL queries to calculate bonuses and annual salaries. The queries demonstrate how to retrieve employee data and perform calculations on salaries.

Uploaded by

itmanarif
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Day – 14 :

Types of Operators in
SQL

Course created by Satish Dhawale | www.skillcourse.in


Here is a list of the types of operators in SQL:

Arithmetic Comparison Logical Bitwise


Operators Operators Operators Operators

Set String Other


Operators Operators Operators
Arithmetic Operators

Operator Description Example Result


+ Addition SELECT 10 + 5; 15
- Subtraction SELECT 10 - 5; 5
* Multiplication SELECT 10 * 5; 50
/ Division SELECT 10 / 5; 2
Modulus
% SELECT 10 % 3; 1
(remainder)
1) Retrieve the first_name, salary, and
calculate a 10% bonus on the salary.

SELECT FIRST_NAME,SALARY,
(SALARY * 0.10) AS BONUS
FROM EMPLOYEE2;
2) Calculate the Annual Salary and
Salary Increment by 5% - show the
monthly new salary as well

SELECT first_name, last_name, salary,


(salary * 12) AS annual_salary,
(salary * 0.05) AS increment_amount,
(salary * 1.05) AS new_salary,
(salary + salary*0.05) as new_salary2
FROM employee2;

You might also like