Cycle thru columns in table?

From: Rich <richmarin_at_earthlink.net>
Date: Tue, 2 Mar 2010 13:09:38 -0800 (PST)
Message-ID: <ce9c21a0-f441-435c-ba3f-401e124cfa02_at_k5g2000pra.googlegroups.com>


1 am using 10g.

I need code that returns the column name of the table and the value of a row of code. For example, assume I have a table called Customer. Then imagine if there is a column called First_Name. My SQL will return one record. So that the output might look like

First_Name = Fred

The psudo code might look like

For i = 1 to the last column in table

   column_name := column(i)
   record_value := cursor(i)
Loop

How can I do the above in Oracle? Received on Tue Mar 02 2010 - 15:09:38 CST

Original text of this message