Can someone explain things a little better to me? How do I show the structure of a table?
I run the select * from table; and of course it displays all that’s in the table. But, I am being asked to show the structure of the table. What does that mean, and what is the command?
Here’s my table below.
SQL> select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL>
To list columns and data types, I typically use
It’s been a while since I’ve worked with Oracle though.
ALL_TAB_COLUMNSmight actually beALL_TAB_COLS.If you need to display the full
CREATE TABLEstatement, see How to get Oracle create table statement in SQL*Plus