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
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

Class Diagram A class diagram is required to support functional necessity of system. In a static design view, class diagram is used to model vocabulary of the system, simple c

2NF Normal Form : A relation schema process R is in 2NF if it is in 1NF and each non-prime attribute A in R is fully functionally related on primary key. Second normal form (2N

Cardinality shows the number of instances of an entity associated with another entity participating in a relationship. Depend on the cardinality binary relationship can be further

Complete replication: It implies maintaining of a whole copy of the database at every site. Thus, the reliability & availability and performance for query response are maximized.

er diagtram for icici

What is system log?  What are the entries?       Ans:  The system log that is generally written on stable storage contains the redundant data required to recover from volatile

What are the costs to be considered when a transaction has to be rolled back when recovering from deadlock?         Ans: A few transaction will must rolled back (made a victim)


What is called a query evaluation plan? A sequence of primitive operations that can be used to assess a query is a query evaluation plan or a query implementation plan.