Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Can we see the description of a table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 45
Location: india

PostPosted: Tue May 03, 2005 11:35 pm    Post subject: Can we see the description of a table.
Reply with quote

can we see the description of a table without using the select query..
is there any command like desc <tablename> just like sql..
Back to top
View user's profile Send private message
References
priya

Moderator


Joined: 24 Jul 2003
Posts: 624
Location: Bangalore

PostPosted: Wed May 04, 2005 7:20 am    Post subject:
Reply with quote

You can try DCLGEN of DB2I
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 259
Location: India

PostPosted: Wed May 04, 2005 3:28 pm    Post subject:
Reply with quote

command is
describe table <table-name>
correct me if i m wrong
Back to top
View user's profile Send private message
ashutosh719

New User


Joined: 06 Apr 2005
Posts: 13

PostPosted: Wed May 04, 2005 4:40 pm    Post subject:
Reply with quote

u can also go to bmc option-p;b;7 and try with all available options.
if not bmc..try with CA tools option-p;b;2
Back to top
View user's profile Send private message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 45
Location: india

PostPosted: Sat May 14, 2005 7:50 pm    Post subject:
Reply with quote

hi all..
what is this bmc option and ca tools can u help me to know that...
Back to top
View user's profile Send private message
asridhar

New User


Joined: 04 May 2005
Posts: 5
Location: Hyderabad

PostPosted: Tue May 17, 2005 12:39 pm    Post subject:
Reply with quote

command is
describe table <table-name>

this is only in Oracle , if u want to describe table in Mainframe DB2 use DCLGEN
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Tue May 17, 2005 2:23 pm    Post subject: DB2
Reply with quote

Hi,

I am not sure that whether we have DESC command is there in DB2. If any body worked on that please forgive this sentence.

Normally if we want to see the structure of a table we can get the column details from SYSIBM.SYSCOLUMNS table.


pavan
Back to top
View user's profile Send private message
kalinga

New User


Joined: 25 May 2005
Posts: 4
Location: chennai,india

PostPosted: Wed May 25, 2005 4:15 pm    Post subject:
Reply with quote

hi,
we can see the table structure by

SELECT * FROM TABLE_NAME
WHERE 1=2
Back to top
View user's profile Send private message
Girishm

New User


Joined: 09 Mar 2005
Posts: 35
Location: Mysore

PostPosted: Wed May 25, 2005 4:55 pm    Post subject:
Reply with quote

Hi all,

The query to see the structure of any table is:
SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBNAME='TABLE_NAME'

This will return all the columns, datatype, etc...


______________
GM
Back to top
View user's profile Send private message
vasanthanc

Active User


Joined: 01 Apr 2005
Posts: 59

PostPosted: Wed May 25, 2005 4:59 pm    Post subject:
Reply with quote

Kalinga,
your query will not give structure of the table.
It will just display the column names
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1