Special comparison operator used in where clause-dml, Database Management System

Assignment Help:

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;


Related Discussions:- Special comparison operator used in where clause-dml

Discuss the different layers of ansi sparc architecture, Q.1 Briefly discus...

Q.1 Briefly discuss the different layers of ANSI SPARC architecture. Ans: The three layers of ANSI SPARC architecture are like this: 1. Internal view is at the lowest leve

What is log shipping, What is Log Shipping? Log shipping is the method ...

What is Log Shipping? Log shipping is the method of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a stand

Architecture, With the help of a suitable diagram gives module wise explana...

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

Load - unload utilities, These permit the user to unload a database or part...

These permit the user to unload a database or parts of a database and reload the data on the similar machine, or on another machine in a dissimilar location. This can be useful in

Whta is the advantage of the database management approach, Whta is the adva...

Whta is the advantage of the database management approach? The advantage of the database management approach is data is integrated and can be accessed by multiple programs.

What do you understand by a view, What do you understand by a view? What do...

What do you understand by a view? What does WITH CHECK OPTION clause for a view do? - A view is a virtual table which comprises fields from one or more real tables. - It is

Relationship, what is the relationship between receipt and owner entities i...

what is the relationship between receipt and owner entities in computer sales and service company

Create a database for store company details, You group has been hired by  T...

You group has been hired by  TrainingrUs.com to keeps track of training revenues. TrainingrUS.com wants you to keep scheduling. COURSE table contains following information:

Determine the steps of path in association network, Determine the steps of ...

Determine the steps of path in association network You can analyse use of paths in association network in the following steps:  Examine every operation and see what asso

Explain strict two-phase locking, Explain Strict Two-Phase locking A tr...

Explain Strict Two-Phase locking A transaction T does not release any type of its exclusive (X) locks until that transaction commits or aborts. In this method no other transact

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd