SQL Language (MOSC)

MOSC Banner

using sqlplus not PL/SQL

edited Apr 15, 2012 6:40PM in SQL Language (MOSC) 6 commentsAnswered
I have table t1 with columns c1,c2 and c3 that are vchar2.
Is it possible to write a single sqlplus (not pl/sql) statement to
- If c1 is not null, return all rows that match c1
        select * from t1 where c1='JJJ'; for an example

- Otherwise return all rows in t1
        select * from t1;

Thanks,


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