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
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