PL/SQL (MOSC)

MOSC Banner

Deleles and NULLS

edited Oct 13, 2013 8:48PM in PL/SQL (MOSC) 10 commentsAnswered
Hi,

I have a table, T1, with two columns, C1 and C2. C2 could be null.
I wrote the following PL/SQL code

                IF C2 IS NULL THEN
                        delete T1 where C1 = C1_VALUE and C2 is NULL;
                ELSE
                        delete T1 where C1 = C1_VALUE and C2=C2_VALUE;
                END IF;
This is for Oracle 11.2.0.2 running on Linux

Could the above code be written in a more concise way?

Thanks,

Hisham

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center