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 SQL, and why is it important? SQL stands for Structured Query Language, and is the most significant data processing language in use today. It is not a complete programm

How does Tuple-oriented relational calculus vary from domain-oriented relational calculus? The tuple-oriented calculus uses a tuple variables i.e., variable whose only allowed

What is the used of specifying alias? Specifying alias: is used to rename column or attribute in a table.

can you please explain with the help of suitable example the difference between conflict equivalence and conflict serializability?

To do the division operation R1 ÷ R2, R2 should be a correct subset of R1. In the following example R1 have attributes A and B and R2 have only attribute B so R2 is a correct subse

Problem: a) Briefly describe what you understand by Client-Server environment b) The File Server is a simple form of Client-Server. Describe the principles of the File Serve

This constraint shows that the key attribute value in each tuple must be unique, i.e., no two tuples have the similar value for the key attribute. This is because the value of the

How Relational Calculus is different from Relational Algebra? What do understand by TRC queries and DRC queries?  Ans: Relational calculus contain two calculi, the tuple relati

Compare wait-die deadlock prevention scheme with wait-wound scheme   Ans:  Wait-Die Scheme  a) Based upon a nonpreemptive technique.  b) If Pi requests a resource present

Discuss how the bi-directional Implementations are made. In bi-directional implementation of the association, a pair of references must implement every link. The declarations a