I want to know the Query that allows us to view all the columns that are defined for a table in oracle database.
Elaboration:
Table Name: Some_Table have 10 columns.
I want to know how I can retrieve the all column names, their data type, and any constraints that are defined for any column.
To do that you can query(depending on privileges granted to you)
[user|all|dba]_tab_columns,[user|all|dba]_cons_columns,[user|all|dba]_constraintsviews.Here is a quick example:
Result:
Also to retrieve a complete specification(if needed) of a table, you can use
dbms_metadatapackage andget_ddlfunction of that package: