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
Control Structures The Control structures are the most important PL/SQL extension to the SQL. Not only does PL/SQL let you manipulate Oracle data, it lets you process the data

Iterative Control: LOOP  Statements The LOOP statement executes a series of statements multiple times. There are 3 forms of LOOP statements: LOOP, WHILE-LOOP, & FOR-LOOP. LOOP

%NOTFOUND The %NOTFOUND is the logical opposite of the %FOUND. The %NOTFOUND yields TRUE when an INSERT, UPDATE, or DELETE statement affected no rows, or the SELECT INTO state

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

Committing and Rolling Back The COMMIT and ROLLBACK end the active autonomous transaction but do not exit the autonomous routine. As the figure shows, if one transaction ends,

Tables within a Table - SQL Figure here is an exact copy of the one in the theory book and as before it is just an alternative way of representing some of the information con

Defining Autonomous Transactions To define an autonomous transaction, you use the pragma (compiler directive) AUTONOMOUS_TRANSACTION. The pragma instructs the PL/SQL compiler

Package STANDARD The package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Using the Collection Methods The collection methods below help to generalize the code and make collections easier to use and also make your applications easier to maintain: