Special comparison operator used in where clause-dml, Database Management System

Special comparison operator used in where Clause

a.   between. ...and...It gives range among two values (inclusive)

Example:

SELECT ENAME, SAL FROM EMP

WHERE SAL BETWEEN 1000 AND 1500;

b.   In (list): match any of a list of values

Example:

SELECT EMPNO, ENAME, SAL, MGR FROM EMP

WHERE MGR IN (7902, 7566, 7788);

7902, 7566, and 7788 are Employee numbers c.      Like: match a character pattern

  • % indicates zero or many characters
  • Like operator is used only with char and Varchar2 to match a pattern
  • _ indicates one character
  • Combination of % and_can also be used.

Example:

(I)  List the names of employees whose name begins with 's' SELECT ENAME FROM EMP

WHERE ENAME LIKE 'S%';

 (II)    List the ename finished with's'

SELECT ENAME FROM EMP WHERE ENAME LIKE '%S';

(III)   List ename having I as a second character

SELECT ENAME FROM EMP WHERE ENAME LIKE '_I%';

d. Is null operator

Example:

 to search employee whose manage-id is not specified

SELECT ENAME, MGR FROM EMP WHERE MGR IS NULL;

Posted Date: 3/11/2013 1:04:31 AM | Location : United States







Related Discussions:- Special comparison operator used in where clause-dml, Assignment Help, Ask Question on Special comparison operator used in where clause-dml, Get Answer, Expert's Help, Special comparison operator used in where clause-dml Discussions

Write discussion on Special comparison operator used in where clause-dml
Your posts are moderated
Related Questions

What is DML (Data Manipulation Language)? This language that enable user to access or manipulate data as organised by appropriate data model. Procedural DML or Low level: DM

Consider the join of a relation R with relation S. If R has m tuples and S has n tuples, then the maximum size of join is: If R has m tuples and S has n tuples then maximum siz

Partial Key : It is a group of attributes that can uniquely identify small entities and that are related to same base entity. It is sometime named as Discriminator.  Altern

I need a professional to prepare a database to collect and store basic information. The information can be basic info such as contact details etc. One requirement i have is f

A Relation Schema represented by R(A1, A2, ..., An) is made up of the relation name the list of attributes and R Ai that it contains. A relation is described as a set of tuples

How many physical thing?

Gaps in sequence values can happen when: -     A rollback happens that is when a statement changes are not accepted. -     When the system crashes -     When a sequence i

The definition of the classes and operation can often be adjusted to increase the amount of inheritance". Justify the above statement.   Adjustment of Inheritance The def

Explain the conventions for displaying an ER schema as an ER diagram? An E-R Diagram scheme might describe certain constraints to that the contents of a database must conform.