How do I see the table definitions (columns, data types of columns, constraints or default values set etc) of a table in QMF? I tried 'DESCRIBE TABLE' but didn't work (not able to execute in QMF). I can see the DCLGEN but looking for a way to see the actual table definition?

Questions by abhanuc

Showing Answers 1 - 2 of 2 Answers

hemant

  • Apr 18th, 2006
 

SELECT * FROM SYSIBM.SYSCOLUMNS WHERE

TBNAME=table-name AND

TBCREATOR=' creator-name';

or

to see column names, types and lengths

SELECT NAME,COLTYPE,LENGTH FROM SYSIBM.SYSCOLUMNS WHERE

TBNAME=table-name AND

TBCREATOR=' creator-name';

 

 

the above queries can be used

 

rupesh

  • Feb 22nd, 2007
 

select constrint_name,constraint_type,search_condition from user_constraints
where table_name='name of table in upper case';

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.