KnowledgeBoat Logo

Computer Science

Write a query to display employee name and salary of those employee who don't have their salary in the range of 2500 to 4000.

SQL Queries

4 Likes

Answer

SELECT ENAME, SAL
FROM empl
WHERE SAL NOT BETWEEN 2500 AND 4000;
Output
+----------+------+
| ENAME    | SAL  |
+----------+------+
| SMITH    |  800 |
| ANYA     | 1600 |
| SETH     | 1250 |
| MOMIN    | 1250 |
| AMIR     | 5000 |
| KULDEEP  | 1500 |
| SHIAVNSH | 2450 |
| ANOOP    | 1100 |
| JATIN    |  950 |
| MITA     | 1300 |
+----------+------+

Answered By

1 Like


Related Questions