View previous topic :: View next topic
|
Author |
Message |
amitkoshti Warnings : 1 New User
Joined: 04 Oct 2006 Posts: 10 Location: Pune
|
|
|
|
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 |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
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 |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
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 |
|
|
|