Logical operators-logical operators, Database Management System

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;

Posted Date: 3/11/2013 1:06:37 AM | Location : United States







Related Discussions:- Logical operators-logical operators, Assignment Help, Ask Question on Logical operators-logical operators, Get Answer, Expert's Help, Logical operators-logical operators Discussions

Write discussion on Logical operators-logical operators
Your posts are moderated
Related Questions
what do you understand by enhanced entity-relationship

What is known as a search key? An attribute or set of attributes used to look up records in a file is known as a search key.

Chapter 1 - Profile for the Organization You have to select an organization of your choice and assume that you work for that organization. Now you must prepare a brief profile of t

What is foreign key? A relation schema r1 derived from an ER schema may contain among its attributes the primary key of another relation schema r2.this attribute is known as a

What is equi join? Equi Join - It generates all the combinations of tuples from two relations which satisfy a join condition along with only equality comparison (=).


FDs in Entities : Student entity :                                                Enrolment number →  Student name, Address Course Entity :

Consider employee (e_no, e_name, e_salary, d_code), dept (d_code, d_name) and dependent (depndt_name, e_no, relation). Show the names of employees in purchase and accounts departm

The entity type STUDENT has the following attributes: Student Name, Address, Phone, Age, Activity, and No of Years. Activity represents some campus-based student activity, and No o

Explain five duties of Database Administrator? 1. DBA administers the three stages of the database and, in consultation along with the whole user community, sets up an defin