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
Cursor Variables:   To execute the multi-row query, the Oracle opens an unnamed work region that stores the processing information. You can use an explicit cursor that names

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Anatomy of a Table: Figure shows the terminology used in SQL to refer to parts of the structure of a table. As you can see, SQL has no official terms for its counterpa

Initializing Records The illustration below shows that you can initialize a record in its type definition. Whenever you declare a record of the type TimeRec, its 3 fields supp

Great Plains (Microsoft Dynamics) Purchases Report Project Description: I want to build a purchases report that matches the General Ledger. presently, when I join the PM20

Use the MASCOT tables CREDITRS, PORDS and PAYMENTS to write SQL queries to solve the following business problems. These tables / data are available to you via the USQ Oracle server

Brewbean's is implementing a new discount for return shoppers - every fifth completed order receives a 10% discount. The count of orders for a shopper is placed in a packaged varia

Creating a SQL file 1. Open a new file in Notepad++ and save it to the location c:\mysql\bin, with the name lab8script.sql (the file extension should be .sql ). Add a MySQL co

Parameter and Keyword Description: cursor_name: This identifies an explicit cursor formerly declared within the present scope. cursor_variable_name: These identif

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_d