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 the function of SQL Server Agent Windows service? - It's a Windows service that handles tasks scheduled within SQL Server environment. These tasks are also known as job

er diagtram for icici

Determine the Other System Design Issue How to realise subsystems; through hardware or software? How is object model mapped on chosen hardware software? Mapping

Prove that a relation which is 4NF must be BCNF.   Ans Let R be in 4NF.  Suppose it is not in BCNF.  Hence, there exists an FD X→Y in R such that x is not a super key. Although

What is Identity? Identity (or AutoNumber) is a column that automatically produces numeric values. A start and increment value can be set, but most DBA leave these at 1. A GUID

What is bucket overflow and how bucket overflow is handled through Over Flow Chaining or Closed Hashing? Ans: Bucket: unit of storage holding records. Bucket is a disk block

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?

Objectives differentiate DDBMS and conventional DBMS; Describe Network topology for DDBMS; Describe the concepts of horizontal and vertical fragmentation; Descr

List two restrictions that are applied on the modification (updation, insertion or deletion) of base tables through view.  Ans: The two restrictions are: 1. If a view

Need For Distributed Database Systems A distributed database is a set of database kept on multiple computers that appears to applications as a one database. As a result, an app