Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Loop trough row or get info on row or cursor
Morning,
if you have something like a cursor reading from a table into a row type variable (and this is off the top of my head !) like :
vRowType TABLE_NAME%rowtype
and you want to see what is in it (all the columns)
select <stuff> from user_tab_columns
where table_name = 'TABLE_NAME';
You can get at the column name, data type, precision .....
Do a desc user_tab_columns and find out.
Cheers,
Norm.
Tel: 0113 289 6265 Fax: 0113 289 3146 URL: http://www.Lynx-FS.com
-------------------------------------
-----Original Message-----
From: tim.gahnstroem_at_cern.ch (Tim Gahnstroem)
[mailto:tim.gahnstroem_at_cern.ch]
Posted At: Thursday, August 14, 2003 9:03 AM
Posted To: misc
Conversation: Loop trough row or get info on row or cursor
Subject: Loop trough row or get info on row or cursor
Hello
What kind of information is possible to get from a cursor or a rowtype in oracle pl/sql. I want to display information about a object on a webpage, al information, in one column. The information is stored in one row in one table.
I could of course reference all column names and display the
information from one at the time but this gives some disadvantages.
First of all, if a column is removed from the table in the future, the
program will crash.
Second, if a column is added it will not be displayed and no notice
given. So a good thing would be if I could loop trough the table
sideways in some way or if I at least could get information about how
many columns exist (it is not likely that one column will be removed
but perhaps one will be added).
I don't think this is possible in oracle any information (or pointer to a good webpage) about what info I can get out of a cursor or row would be appreciated.
Thanks a lot
Tim Received on Thu Aug 14 2003 - 07:00:48 CDT
![]() |
![]() |