Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
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: 252
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: 12

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: 48
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

New User


Joined: 01 Apr 2005
Posts: 58

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts TWS EQQYCAIN - not sure how to get ap... mbenaud IBM Tools 0 Wed Dec 14, 2016 8:45 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us