Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get table information in DB2?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
amitkoshti
Warnings : 1

New User


Joined: 04 Oct 2006
Posts: 10
Location: Pune

PostPosted: Fri Feb 02, 2007 2:56 pm    Post subject: Re: How to get table information in DB2?
Reply with quote

How to get infomation about each column of table in DB2? It should give column name, constraint on it, triggers if defined like we give while creating a table as shown below

CREATE TABLE EMPLOYEE
(EMPNO INTEGER GENERATED ALWAYS AS IDENTITY,
NAME CHAR(30),
SALARY DECIMAL(5,2),
DEPTNO SMALLINT);
Back to top
View user's profile Send private message

mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri Feb 02, 2007 3:01 pm    Post subject: Re: How to get table information in DB2?
Reply with quote

Hi amitkoshti,

DCLGEN will give all the information about column names, constraints as u define at the time of table creation.

If wrong please correct me.
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Fri Feb 02, 2007 5:16 pm    Post subject: Re: Re: How to get table information in DB2
Reply with quote

Hi,

You are true, DCLGEN gives the solution, But for query

Code:

SELECT
            NAME,  TBCREATOR,  COLTYPE,  LENGTH,  NULLS
            FROM SYSIBM.SYSCOLUMNS
            WHERE TBNAME = 'table';
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Information About the Equifax Securit... Rohit Umarjikar PC Guides & IT News 6 Mon Sep 11, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us