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 association? Give an example of association Association is used for establishing relationships among classes. Association describe links among/between classes. For exa

Evaluate, compare and contrast the two methods of relational database design namely top down method and Bottom up method. What will be your choice if you are asked to select a meth

A B-tree of order how much children m has maximum ? m has maximum m mchildren in a B tree.

What is called as recursive partitioning? The system repeats the splitting of the input unless each partition of the build input fits in the memory. Such partitioning is known

Question: (a) List four disadvantages of the File Processing System as compared to the Database Systems. (b) The integrity of a database is enforced by integrity rules. One

Differance between DDL and SDL? DDL and SDL - The data definition language (DDL) is used through DBA and database designers to describe internal schema, conceptual schema, and


Explain the utilities which help the DBA to manage the database? Every DBA uses database utilities to maintain and control their databases. But there is a lot of confusion wit

What are ways of finding out either an update is required or not for derived attributes? The ways to find out an update is required or, not are as: Explicit update

What are the object-oriented approaches Software systems which are designed with structured design methodology never support some of desired quality attributes for example reus