DB2 Column Definitions



IBM's flagship relational database management system

DB2 Column Definitions

Postby ballj35 » Wed Mar 09, 2011 8:22 am

I am using SPUFI and would like to see the Column Definitions of a table.
I have been searching the net, but for some reason cannot find the statement.
Could someone plz help me?
I just want to see the datatype of each of the columns. Thanx in advance.

Jerry
ballj35
 
Posts: 33
Joined: Mon Jan 10, 2011 10:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Column Definitions

 

Re: DB2 Column Definitions

Postby dick scherrer » Wed Mar 09, 2011 9:04 am

Hello,

Try this:
SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBNAME = 'TABLENAME' AND TBCREATOR = 'CREATORNAME' ORDER BY COLNO ;
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: DB2 Column Definitions

Postby ballj35 » Wed Mar 09, 2011 12:09 pm

Maybe I asked the question incorrectly. I did try the code
and did nto get the results I am trying to find.

SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBNAME = 'ZOS111.DSN8910.EMPQA' 001535
AND TBCREATOR = 'QA1' ORDER BY COLNO; 001536
---------+---------+---------+---------+---------+---------+---------+--------
NAME
---------+---------+---------+---------+---------+---------+---------+--------
DSNE610I NUMBER OF ROWS DISPLAYED IS 0
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100
---------+---------+---------+---------+---------+---------+---------+--------
-- 001537
SELECT * FROM ZOS111.DSN8910.EMPQA; 001538
---------+---------+---------+---------+---------+---------+---------+--------
EMPNO FIRSTNME MIDINIT LASTNAME WORKDEPT PHONENO HIREDATE
---------+---------+---------+---------+---------+---------+---------+--------
444420 TEST 11... K JOHN......... D11 0672 1968-08-29
000010 CHRISTINE I HAAS A00 3978 1965-01-01
000020 MICHAEL L THOMPSON B01 3476 1973-10-10

I am trying to get the datatype definitions for EMPNO, FIRSTNME, MIDINIT,
LASTNAME, etc from the ZOS111.DSN8910.EMPQA table. Again, I apologize
for not stating my question correctly.
ballj35
 
Posts: 33
Joined: Mon Jan 10, 2011 10:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Column Definitions

Postby ballj35 » Wed Mar 09, 2011 1:33 pm

Problem resolved by testing using SPUFI. This post can be closed! Thanx for
the help in this matter.

Jerry
ballj35
 
Posts: 33
Joined: Mon Jan 10, 2011 10:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Column Definitions

Postby BillyBoyo » Wed Mar 09, 2011 4:43 pm

I hope that isn't real data. From the hire-dates, maybe not, but maybe ballj35 can confirm it is test data only (and not data in any way from production).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: DB2 Column Definitions

Postby ballj35 » Wed Mar 09, 2011 4:50 pm

Nope just test data I am playing with. Thanx.
ballj35
 
Posts: 33
Joined: Mon Jan 10, 2011 10:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Column Definitions

Postby dick scherrer » Thu Mar 10, 2011 3:25 am

Good to hear it is working - thank you for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post