0 votes
1 view
in SQL by (20.3k points)

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?

1 Answer

0 votes
by (40.3k points)

You can try querying the USER_TAB_COLUMNS table for table column metadata.


SELECT table_name, column_name, data_type, data_length


WHERE table_name = 'MYTABLE'

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !