}

Oracle: SQL query to Select Column Names From the Table

Problem

With Oracle database you can use a sql query to retrieve columns names of a table.

Answer

The following query will retrieve all column names from the table TUTORIALS:

Select column_name from user_tab_cols where table_name =3D'TUTORIALS';

The table name must be in capital letters.

Leonardo Lazzaro

Software engineer and technical writer. 10+ years experience in DevOps, Python, and Linux systems.

More articles by Leonardo Lazzaro