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

Can we see the description of a table.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Tue May 03, 2005 11:35 pm
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
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Wed May 04, 2005 7:20 am
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: 252
Location: India

PostPosted: Wed May 04, 2005 3:28 pm
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: 12

PostPosted: Wed May 04, 2005 4:40 pm
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: 48
Location: india

PostPosted: Sat May 14, 2005 7:50 pm
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
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
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
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
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

New User


Joined: 01 Apr 2005
Posts: 58

PostPosted: Wed May 25, 2005 4:59 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top