Home » SQL & PL/SQL » SQL & PL/SQL » Need Query?? (Connected to Oracle Database 10g Enterprise Edition Release )
Need Query?? [message #379292] Mon, 05 January 2009 23:37 Go to next message
Messages: 6
Registered: October 2007
Location: mumbai
Junior Member

Hi To All,

Suppose talbe has 5 columns.We write a select * from my_tbl;
But in table having data only in 2 columns remaining are nulls.So how to ignore null columns vlaues in
"select * from my_tbl"
Re: Need Query?? [message #379298 is a reply to message #379292] Tue, 06 January 2009 00:03 Go to previous message
Messages: 1832
Registered: November 2006
Senior Member
So how to ignore null columns vlaues in "select * from my_tbl"

I suppose you are talking about columns having all values NULL.
However it is not possible - this query will have always the same output. Either "ignore null columns vlaues" when reading the result or specify columns "having data" explicitly.

They (columns "having data") may be identified with the following query
SELECT COUNT(<column1>), COUNT(<column2>), ..., COUNT(<column5>)
FROM my_tbl
by showing non-zero values.
Previous Topic: PL/SQL: ORA-00904: "DICTIONARY_OBJ_NAME": invalid identifier (3 threads merged by bb)
Next Topic: Grouping the Columns
Goto Forum:

Current Time: Wed Oct 26 03:08:51 CDT 2016

Total time taken to generate the page: 0.10824 seconds