Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Returning column names.

Re: Returning column names.

From: kevin.bishop <kevin.bishop_at_ntlworld.com>
Date: Wed, 18 Apr 2001 21:13:53 +0100
Message-ID: <mxmD6.2876$a46.225496@news2-win.server.ntlworld.com>

I am assuming you have the table_name & the rowid of the row you want to interogate. Otherwise how are you identifying the row? Plus you can identify the column names from all_tab_coluns OR dba_tab_columns

To return the columns of the table try
set pagesize 0
spool col.sql
select
'select '''||column_name||''' from YOUR_TABLE where '||column_name||' is

null and rowid = ''XXXXXXXXXXXXXXXXXXXXXXXX'';'
from all_tab_columns
where table_name = 'YOUR_TABLE'
spool off
@col.sql

Yours

Kevin Bishop
Oracle DBA Received on Wed Apr 18 2001 - 15:13:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US