In operator-comparison operators, PL-SQL Programming

IN Operator

The operator IN tests the set membership. This means "equal to any member of." The set may have nulls, but they are ignored. For illustration, the statement below does not delete the rows in which the ename column is null:

DELETE FROM emp WHERE ename IN (NULL, ’KING’, ’FORD’);

Moreover, the expressions of the form

value NOT IN set

yield FALSE when  the set contains a null. For illustration, instead of deleting the rows in which the ename column is not null and not ’KING’, the statement below deletes no rows:


DELETE FROM emp WHERE ename NOT IN (NULL, ’KING’);


Concatenation Operator

The Double vertical bars (||) serve as the concatenation operator that appends one string to another. For illustration, the expression

’suit’ || ’case’

returns the value as shown below:

’suitcase’

If both the operands have datatype CHAR, the concatenation operator returns a CHAR value. Or else, it returns a VARCHAR2 value.

Posted Date: 10/3/2012 5:33:44 AM | Location : United States







Related Discussions:- In operator-comparison operators, Assignment Help, Ask Question on In operator-comparison operators, Get Answer, Expert's Help, In operator-comparison operators Discussions

Write discussion on In operator-comparison operators
Your posts are moderated
Related Questions
Initializing Objects: Till you initialize an object by calling the constructor for its object type, the object is automatically null. That is, the object itself is null, not me

At times, Brewbean's has changed the id number for existing products. In the past, they have had to add a new product row with the new id to the BB_PRODUCT table, modify all the co

Third Step at defining type SID in SQL CREATE DOMAIN SID AS VARCHAR(5) CHECK ( VALUE IS NOT NULL AND SUBSTRING(VALUE FROM 1 FOR 1) = 'S' AND CAST('+'||SUBSTRING(VALUE

The SQL ‘CREATE TABLE' scripts for all the tables you have implemented. Note that your tables must correspond exactly to the ERD you have provided in 1. above, or you will lose ma

UNION and OR - SQL SQL supports UNION explicitly but differently from the way it supports JOIN explicitly. As we have seen, JOIN is used exclusively within the FROM clause, su

Named Notation The second procedure call uses the named notation. An arrow (=>) serve as the relationship operator that associates the formal parameter to the left of the arro

Using FIRST and LAST FIRST and LAST return the first and last (minimum and maximum) index numbers in a collection. When the collection is empty, the FIRST and LAST return NULL

Manipulating Individual Elements Faraway you have manipulated an entire collection. Within the SQL, to manipulate the individual elements of the collection, and then use the ope

Using %ROWTYPE The %ROWTYPE attribute gives a record type which represents a row in a table (or view). The record can store the whole row of data selected from the table or fetc

What are the rates for help in writing PL/SQL procedures and functions?