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
Multilevel Indexing Scheme Consider the indexing scheme where the address of the block is consider in the index for each record, for a little file, this index would be little a

Describe domain constraints. Domain constraints contain entity integrity and referential integrity. The domain is a set of values that might be assigned to an attribute. The en


What is meant by buffer blocks and disk buffer   The blocks residing temporarily in main memory are referred to as buffer blocks. The area of memory where blocks reside t

Question 1: Define the term business intelligence tools? Briefly explain how the data from one end gets transformed into information at the other end? Definition Exp

What is entity in DBMS? Entity: A DBMS entity is either a thing in the modelled world or a drawing element in an ERD.

WHAT IS DBMS

Submit SQL SELECT Statements to demonstrate several reports off your database, according to the following guidelines: You must submit at least 5 SELECT Statements. Each

Relationship between Security and Integrity: Database security usually refers to access, while database integrity refers to avoidance of accidental loss of consistency. But usually

Database design Database tables will be created for you on the Technology web server. The schema will be as follows. Please note that this is a simplified database structure, d