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

18 SQL – Other Operators in SQL

The document discusses SQL operators including IS NULL, ORDER BY, LIMIT, and DISTINCT. It provides example queries for each operator, such as finding employees with NULL email addresses, sorting employees by salary, retrieving the top 5 highest-paid employees, and listing unique departments. The course is created by Satish Dhawale and is available at www.skillcourse.in.

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)
4 views

18 SQL – Other Operators in SQL

The document discusses SQL operators including IS NULL, ORDER BY, LIMIT, and DISTINCT. It provides example queries for each operator, such as finding employees with NULL email addresses, sorting employees by salary, retrieving the top 5 highest-paid employees, and listing unique departments. The course is created by Satish Dhawale and is available at www.skillcourse.in.

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 – 18 :

IS NULL Operator, ORDER BY Operator,


LIMIT Operator & DISTINCT Operator.

Course created by Satish Dhawale | www.skillcourse.in


IS NULL Operator

Find employees where the email column is NULL (if applicable).

SELECT first_name, last_name, email


FROM employees
WHERE email IS NULL;
Find employees whose email addresses end with gmail.com.

ORDER BY Operator

List employees sorted by salary in descending order.

SELECT first_name, last_name, salary


FROM employees
ORDER BY salary DESC;
Find employees whose email addresses end with gmail.com.

LIMIT Operator

Retrieve the top 5 highest-paid employees.

SELECT first_name, last_name, salary


FROM employees
ORDER BY salary DESC
LIMIT 5;
Find employees whose email addresses end with gmail.com.

DISTINCT Operator

Retrieve a list of unique departments

SELECT DISTINCT department


FROM employees;

You might also like