Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL statement to show all columns of a table

Re: SQL statement to show all columns of a table

From: Holger Spangardt <Holger.Spangardt_at_web.de>
Date: Sun, 12 Aug 2001 15:04:05 +0200
Message-ID: <3B767EC5.598262CB@web.de>

Steve Bell schrieb:

> Hi Karsten,
>
> [...]
> 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

Or try "select * from user_tab_columns where table_name ='DEPT';" The table_name must be in upper case. You can user "like" und things like the with this selection (desc can't :-).

Ciao,

    Holger Received on Sun Aug 12 2001 - 08:04:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US