Home » SQL & PL/SQL » SQL & PL/SQL » About Column Names
About Column Names [message #213964] Sat, 13 January 2007 00:54 Go to next message
prakashfrombrigade
Messages: 2
Registered: January 2007
Location: Hyderabad
Junior Member

Hi, I'm new to this site.
I need some help from u all.

I have a table with 10 columns. In those records, some (assume 5 columns) columns have null values.

Now, I want to retrieve the 'column names' which have the null values.
Is it possible to do so?
Please reply.

Thanq.

Bye.
Re: About Column Names [message #214013 is a reply to message #213964] Sat, 13 January 2007 09:53 Go to previous messageGo to next message
srinivnp
Messages: 136
Registered: January 2006
Location: stlouis MO USA
Senior Member

Run stats on the table . Then do this query.


select column_name from dba_tab_columns
where table_name='FOO1' and num_nulls > 0 ;

Substitute FOO1 with your tablename . Also stats has to be current .

Srini
Re: About Column Names [message #214049 is a reply to message #214013] Sun, 14 January 2007 00:56 Go to previous message
prakashfrombrigade
Messages: 2
Registered: January 2007
Location: Hyderabad
Junior Member

Thanq Sri,
Thanks a lot.
I got the idea how to work in such situations.

I never forget ur help.
Once again thax for ur quick response.

Bye.

Please try to send me the reply for my queries.

Have a nice day....!!!


Prakash.
Previous Topic: Cannot create table??
Next Topic: ora-00939 when using CASE
Goto Forum:
  


Current Time: Fri Dec 09 05:57:57 CST 2016

Total time taken to generate the page: 0.12287 seconds