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
Advantages of PL/SQL The PL/SQL is a high-performance transaction processing, completely portable language that offers the following advantages as shown: 1) Support for SQL

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Using LIMIT For nested tables, that have no maximum size, the LIMIT returns NULL. For varrays, the LIMIT returns the maximum number of elements that a varray can have (that yo

MAX and MIN operator in SQL Example: (SELECT MAX (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') (SELECT MIN (Mark) FROM EXAM_MARK WHERE StudentId = 'S1') Example

How Calls Are Resolved? The figure shows that how the PL/SQL compiler resolves the subprogram calls. When the compiler encounters the procedure or function call, it tries to di

Left and Right Joins LEFT OUTER JOIN can be used when you want to retrieve the data from the main table (table1) even if there is no match in other tables (table_2, table_3...

Mixed Notation The fourth procedure call shows that you can mix the positional and named notation. In this situation, the first parameter uses the positional notation, & the s

heap sort program in pl/sql

Using SET TRANSACTION You use the SET TRANSACTION statement to begin the read-only or read-write transaction, start an isolation level, or assign your present transaction to a

Write an anonymous block that contains a PL/SQL procedure. The procedure takes two input parameter: oldZip and newZip, and it updates the zipcodes table by replacing all oldZip wit