logical operatorsrules of precedenceorder


Logical Operators

Rules of Precedence:

Order evaluated

Operator

1

All comparison operators

2

NOT

3

AND

4

OR

Example: To produce those records of salesman or president who are having salary above 15000/-

Select ename, job, sal from emp

Where job = 'SALESMAN' or job = 'PRESIDENT'

And sal>15000;

The query formulation as above is wrong for the problem statement. The correct formulation would be:

SELECT ENAME, JOB, SAL FROM EMP

WHERE (JOB = 'SALESMAN' OR JOB = 'PRESIDENT') AND SAL>15000;

Request for Solution File

Ask an Expert for Answer!!
Database Management System: logical operatorsrules of precedenceorder
Reference No:- TGS0209794

Expected delivery within 24 Hours