View previous topic :: View next topic
|
Author |
Message |
Anand78
New User
Joined: 06 Mar 2006 Posts: 50 Location: PUNE
|
|
|
|
what is the DB2 equivalent of DESC(in Oracle)? |
|
Back to top |
|
 |
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
I'm not sure whether there is an equivalent of DESC in DB2.
Here is what I think, DESC gives Table description right. So to get the table description which is nothing but list of columns etc, you can query the SYSIMB.SYSCOLUMNS for that table. |
|
Back to top |
|
 |
pravinjose
New User
Joined: 05 Aug 2007 Posts: 2 Location: Hyderabad
|
|
|
|
The DESCRIBE TABLE statement obtains information about a table or view.
Invocation
This statement can only be embedded in an application program, SQL function, SQL procedure, or trigger. It is an executable statement that cannot be dynamically prepared. It must not be specified in Java.
Syntax
>>-DESCRIBE TABLE--variable------------------------------------->
.-INCLUDING IMPLICITLY HIDDEN COLUMNS-.
>--+-------------------------------------+---------------------->
'-EXCLUDING IMPLICITLY HIDDEN COLUMNS-'
.-SQL-. .-LOCAL--.
>--+-USING--+-----+--DESCRIPTOR--+--------+--SQL-descriptor-name-+-><
| '-GLOBAL-' |
'-INTO----descriptor-name----+-------------------------+------'
'-USING--+-NAMES--------+-'
+-SYSTEM NAMES-+
+-LABELS-------+
+-ANY----------+
+-BOTH---------+
'-ALL----------'
Description
variable
Identifies the table or view to describe. When the DESCRIBE TABLE statement is executed:
•The name must identify a table or view that exists at the application server.
•The variable must be a character-string or Unicode graphic-string variable and must not include an indicator variable. It cannot be a global variable.
•The table name that is contained within the variable must be left-justified and must be padded on the right with blanks if its length is less than that of the variable.
•The name of the table must be in uppercase unless it is a delimited name. |
|
Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
pravinjose - You're replying nearly 5 years after the original question was posted...  |
|
Back to top |
|
 |
pravinjose
New User
Joined: 05 Aug 2007 Posts: 2 Location: Hyderabad
|
|
|
|
Ya , I came across this post today only. Thought that it might be useful for someone who views this post in the future.
I was actually trying to find what woud be the Oracle equivalent for AS/400 Physical files which contains multiple File members. |
|
Back to top |
|
 |
|