In which column of which DB2 catalog would you find the
length of the rows for all tables?

Answers were Sorted based on User's Feedback



In which column of which DB2 catalog would you find the length of the rows for all tables?..

Answer / daphne

I assume that you mean "Column length" (Field length) for
all the fields of all the tables.

This can be found in SYSIBM.SYSCOLUMNS. The column name is
LENGTH.

If you want to find the column lengths of a particular
table then the query would be

Select NAME, LENGHT from SYSIBM.SYSCOLUMS where TBNAME =
<tablename>

Is This Answer Correct ?    1 Yes 0 No

In which column of which DB2 catalog would you find the length of the rows for all tables?..

Answer / vat

'RECLENGTH' column of SYSIBM.SYSTABLES would have the
record/row length of the table.

It's format: 8 + n + l where
8 accounts for 6 header bytes and 2 ID map entry bytes
n = 0 if there is no edit proc otherwise 10
l = Sum of max. col lengths (Add 1 byte for Null indicator
for nullable columns, 2 bytes for Varchar columns, 4 bytes
for LOB column)

and, RECLENGTH is 0 for auxilary tables, views and aliases

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is the physical storage length of the data types: date, time, timestamp in the db2 database?

0 Answers  


Can you search give an array in the WHERE clause of a db2 query?

1 Answers  


how to resolve -818 error. how to see timestamp token in load module and plan

4 Answers   IBM,


How do I delete a column in db2?

0 Answers  


Can a unique index have more than one null value? If not, what error code is given if an attempt is made to insert more than one null value?

3 Answers  






how can i pull up a query which was previously stored in qmf

3 Answers  


What is the difference between static and dynamic SQL?

1 Answers  


In my table having 100 Rec. How can I delete the 7th row?? (we don't know what is data inside the table)

9 Answers   IBM,


What if , we failed to mentioed null indicator in sql select query , that may retrieve null value ?

2 Answers   Cap Gemini,


What is a DB2 access path?

1 Answers  


What are the benefits of using the db2 database?

0 Answers  


What is the purpose of using commit?

0 Answers  


Categories