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
After going by the database architecture, let us now dwell on an important query: how is the data organised in a database? There are a lot of basic structures that exist in a datab

With the help of a suitable diagram gives module wise explanation of system architecture of DBMS.on..

construct a B+ tree for the following set of key value (2,3,5,7,11,19,23,29,31) in ascending order where the pointers that will fit in one node is as follows:A. four B. six C. eigh

What are the two approaches to store relations in distributed database? a) Replication b) Fragmentation

Explain the disadvantages of using DBMS There could be a few disadvantages of using DBMS. As DBMS requires computers, we have to invest a good amount in acquiring the hardwa

Explain the term - Control as Concurrent Tasks As we know, any object can be implemented as a task in programming language or operating system. This is the most general approa

Explain CNT in the respects of QBE ? CNT: It is one of the aggregation commands given in QBE. It is used to identify number of tuples

Critically evaluate the bulleted list of information-related items in this case study. How are each contradictory to the notion of being an information-literate knowledge worker?

Making Common Behaviour Abstract Let us define abstraction "Abstraction means to focus on the necessary, inherent aspects of an entity and ignoring its accidental features". O

Database Management Systems 1. Explain SQL Server 2000 Architecture with diagram. 2. Describe Second Normal and Third Normal Form. 3. Explain about query engine and stora