Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL statement to show all columns of a table
Hi Karsten,
In SQL*Plus you can use the "describe" command. Usually people just use its short form, which is "desc". You simply type the word "desc" followed by the name of the table you want to see (e.g. "desc emp"). This is a SQL*Plus command so it doesn't require a terminator (semicolon) after it.
Here's an example to show all the columns in the DEPT table:
SQL> desc dept
Name Null? Type ----------------------------------------- -------- ---------------------------- DEPTNO NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13)
SQL> This will work whether the table is empty or not.
I hope this helps,
Steve
Karsten Wutzke wrote:
> Hi all!
>
> Is there an SQL statement to show all columns of a table? That is, with
> or without any entries... Oh BTW, is there a way to achieve this for an
> EMPTY table?
>
> Thanks from a newbie!
>
> Karsten
Received on Sun Aug 12 2001 - 06:39:55 CDT