IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is the DB2 equivalent of DESC(in Oracle)?


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anand78

New User


Joined: 06 Mar 2006
Posts: 50
Location: PUNE

PostPosted: Thu May 17, 2007 3:04 pm
Reply with quote

what is the DB2 equivalent of DESC(in Oracle)?
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu May 17, 2007 4:51 pm
Reply with quote

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
View user's profile Send private message
pravinjose

New User


Joined: 05 Aug 2007
Posts: 2
Location: Hyderabad

PostPosted: Wed Sep 19, 2012 9:37 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Sep 19, 2012 10:20 am
Reply with quote

pravinjose - You're replying nearly 5 years after the original question was posted... icon_smile.gif
Back to top
View user's profile Send private message
pravinjose

New User


Joined: 05 Aug 2007
Posts: 2
Location: Hyderabad

PostPosted: Wed Sep 19, 2012 12:16 pm
Reply with quote

Ya icon_smile.gif , 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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts Cobol Db2 program (inserting Char Equ... COBOL Programming 0
No new posts Rexx STRIP Equivalent function in CLIST CLIST & REXX 5
No new posts OUTTRAP Equivalent function in CLIST CLIST & REXX 5
No new posts Love it here, But what is the equival... General Talk & Fun Stuff 1
Search our Forums:

Back to Top