Alex Rivera | Logout

How can I get column names from a table in Oracle?

Asked 2009-01-16T23:53:00.937
227

I need to query the database to get the column names, not to be confused with data in the table. For example, if I have a table named EVENT_LOG that contains eventID, eventType, eventDesc, and eventTime, then I would want to retrieve those field names from the query and nothing else.

I found how to do this in:

But I need to know: how can this be done in Oracle?

Edit
Report

1 Answer

3
select column_name,* from information_schema.columns
 where table_name = 'YourTableName'
order by ordinal_position
answered 2012-10-06T08:38:40.560

Your Answer