Site icon IT Tutorial

Oracle SQL Tutorials – Chapter 2 (Part 2 of 3)

IS NULL OPERATOR

SELECT first_name,last_name, manager_id
FROM hr.employees
WHERE manager_id IS not NULL;

 

LOGICAL OPERATORS

 

 

 

AND OPERATOR

SELECT employee_id, first_name,last_name, job_id, salary 
FROM hr.employees 
WHERE salary >= 7000 and first_name LIKE '%A%' ;

 

OR OPERATOR

SELECT employee_id, first_name,last_name, job_id, salary 
FROM hr.employees 
WHERE salary >= 7000 
OR first_name LIKE '%A%' ;

 

NOT OPERATOR

SELECT first_name,last_name, job_id 
FROM hr.employees 
WHERE job_id NOT IN ('IT_PROG', 'ST_CLERK', 'SA_REP') ;

SELECT first_name,last_name, job_id 
FROM hr.employees 
WHERE first_name NOT LIKE '%e%' ;

 

You can continue to read from this link ;

Oracle SQL Tutorials – Chapter 2 (Part 3 of 3)

 

Exit mobile version