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
Describe the capabilities offered via MySQL client APIs? . • Checking for errors. . • Connecting to the MySQL server, selecting a database, disconnecting from the server

Define Direct file organization? The direct file organization is employed to enhance the performance in accessing the records than sequential file organization. In direct file

It defines that no primary key value can be null. This is as the primary key is used to recognize individual tuple in the relation. So we will not be able to recognize the records

Explain recovery process after system failure using checkpoint. Ans: Checkpoint scheme or method is an extra component of the log based recovery system. This scheme is used to

Explain how the object classes are mapped to tables. Each object class maps to one or more than one tables in the database. The objects in the class may be partitioned horizont

Explain the term- Periodic recomputation Periodic recomputation:  Base values are often updated in bunches. Sometimes, it is possible to just recompute all derived attributes p

Object-oriented decompositions Object-oriented decompositions of systems better are able to cope with change. Each subsystem has a well-defined interface which communicates with

The technique of converting the state diagram to code a) Identify all major control paths. Start from initial state; choose a path across the diagram that corresponds to normal

How can Redundant Associations be done It can be done by asking questions: i)  Is there a specific arrangement of network which would optimize critical aspects of completed

Why containment is important in oosystems? Containment is an significant concept in oosystems because it allows dissimilar users to view data at different granularities.