| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DESC Command
Yogi,
You don't have to use the 'DESC' command. You might want to use SQL and get the info from the USER_TAB_COLUMNS table instead. If you have a table, people, try this:
SELECT column_name, nullable, data_type, data_precision
FROM user_tab_columns
WHERE table_name = 'PEOPLE'
...or if you wanted it to look like the DESC results:
SELECT column_name AS "Name",
DECODE(nullable, 'N', 'NOT NULL') AS "Null?",
data_type || '(' || data_precision || ')' AS "Type"
FROM user_tab_columns
...and the USER_TAB_COLUMNS table also has quite a bit of additional info. If you need info on any table independent of schema, there is also a DBA_TAB_COLUMNS table.
Jay!!!
"John (Yogi) Allen LX/M 832 4812" wrote:
> Hello Folks,
>
> I am a newbie to this group, and in a hurry, so please excuse this question
> if it is in a FAQ somewhere. Also please tell me where the FAQ is and I'll
> take a look at it.
>
> We have an Oracle database which is used by a web-based tool, and need to
> find out details of the tables from a server-side Java script. I was advised
> to use the command "DESC <table name>" and tried the following code fragment,
> and variations, without success: info = database.cursor("DESC " + db_table);
>
> Following this, info.next() == false, and info.values == undefined.
>
> Can anyone advise me what I should be doing to see the data?
>
> Any help grategully received...
> Cheers /Yogi
>
> ---
> John (Yogi) Allen ETL XL/XM SEPG (APStools Support)
> Email: etljhan_at_etl.ericsson.se Memo: ETL.ETLJHAN
> Burgess Hill, W.Sussex, UK 832 4812 01444 234812
> "I think, therefore I can" - Thomas the Tank Engine
Received on Thu Nov 12 1998 - 11:22:58 CST
![]() |
![]() |