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

What is the use of with clause in sql, What is the use of with clause in SQ...

What is the use of with clause in SQL? The with clause gives a way of defining a temporary view whose explanation is available only to the query in which the with clause occurs

The data of a view is not physically stored, The data of a view is not phys...

The data of a view is not physically stored, but derived from one or more tables. True the data of a view is not physically stored

Insertion anomaly-data redundancy, Insertion Anomaly: Inability to show ce...

Insertion Anomaly: Inability to show certain information-The primary key of the over relation be (enrolment number, Cno). Any new tuple to be inserted in the relation should have

Write a short note on temporary tables, Write A short note on temporary tab...

Write A short note on temporary tables? Temporary Tables - Temporary tables exists solely for a particular session, or whose data persists for the duration of the transaction

Discuss the concept of data independence, Question: a) Discuss the conc...

Question: a) Discuss the concept of data independence, explaining its importance in a database environment. b) To address the issue of data independence, the ANSI-SPARC t

What is a database, What is a database? At any given time, they're sto...

What is a database? At any given time, they're storing a tremendous amount of information - inventory, in the case of Amazon, messages and interrelationships in the case of Tw

What are the concurrency issues, Concurrency issues Data integrity...

Concurrency issues Data integrity: Threads accessing same object need to be synchronized, such as: banking account. Deadlock: One or more threads in system are perman

Need customer management program, Project Description: This is a Custome...

Project Description: This is a Customer Management project. Customer data is presented in a text file. The program can load this text data into its database columns. The data ma

Define the unique constraints for the table client, Define the following co...

Define the following constraints for the table client. (i) BAL_DUE must be at least 1000. (ii) NAME is a unique key. (i)ALTER TABLE CLIENT ADD CONSTRAINT CLIENT_BAL_DUE_C1

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