Home » SQL & PL/SQL » SQL & PL/SQL » Need Query?? (Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 )
Need Query?? [message #379292] Mon, 05 January 2009 23:37 Go to next message
sonalir
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
flyboy
Messages: 1903
Registered: November 2006
Senior Member
Quote:
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: Thu Feb 13 10:45:04 CST 2025