View previous topic :: View next topic
|
Author |
Message |
gokuldass
New User
Joined: 18 Mar 2005 Posts: 48 Location: india
|
|
|
|
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 |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
You can try DCLGEN of DB2I |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
command is
describe table <table-name>
correct me if i m wrong |
|
Back to top |
|
|
ashutosh719
New User
Joined: 06 Apr 2005 Posts: 12
|
|
|
|
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 |
|
|
gokuldass
New User
Joined: 18 Mar 2005 Posts: 48 Location: india
|
|
|
|
hi all..
what is this bmc option and ca tools can u help me to know that... |
|
Back to top |
|
|
asridhar
New User
Joined: 04 May 2005 Posts: 5 Location: Hyderabad
|
|
|
|
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 |
|
|
i413678 Currently Banned Active User
Joined: 19 Feb 2005 Posts: 112 Location: chennai
|
|
|
|
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 |
|
|
kalinga
New User
Joined: 25 May 2005 Posts: 4 Location: chennai,india
|
|
|
|
hi,
we can see the table structure by
SELECT * FROM TABLE_NAME
WHERE 1=2 |
|
Back to top |
|
|
Girishm
New User
Joined: 09 Mar 2005 Posts: 35 Location: Mysore
|
|
|
|
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 |
|
|
vasanthanc
New User
Joined: 01 Apr 2005 Posts: 58
|
|
|
|
Kalinga,
your query will not give structure of the table.
It will just display the column names |
|
Back to top |
|
|
|