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 used of specifying alias, What is the used of specifying alias?...

What is the used of specifying alias? Specifying alias: is used to rename column or attribute in a table.

What is relational calculus, What is Relational calculus? Relational c...

What is Relational calculus? Relational calculus is a Non- Procedural language.

Database Management System, please give me introduction to full data in D B...

please give me introduction to full data in D B M S in a short assignment

Describe domain constraints, Describe domain constraints. Domain constr...

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

One-to-many relationship, For each 1: n relationship type R involving two e...

For each 1: n relationship type R involving two entities E1 and E2, we recognize the entity type (say E1) at the n-side of the relationship type R and contain primary key of the en

Data, Explain three main attributes of data.

Explain three main attributes of data.

Define rule that value of foreign key appear in other table, Determine the ...

Determine the rule that a value of a foreign key should appear as a value of some particular table is called a  Ans: Referential constraint.    The rule that a value of a fo

What are the two integrity rules, What are the two integrity rules?  An...

What are the two integrity rules?  Ans:  The two integrity rules are: Entity Integrity Rule & Referential Integrity Rule.   Entity Integrity Rule - If the attribute A of rel

Strict 2pl-two phase locking (2pl), Strict 2PL :Though, this basic 2PL suff...

Strict 2PL :Though, this basic 2PL suffers from the trouble that it can result into loss of isolation / atomic property of transaction as theoretically speaking once a lock is rele

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