In which column of which DB2 catalog would you find the
length of the rows for all tables?
Answer Posted / 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 |
Post New Answer View All Answers
What are the uses of db2 optimizer?
What does runstats do in db2?
I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.
What is host variable?
What is the function of logging in the db2 database?
What is reorg?
What is copy pending status in db2?
How to execute stored procedures?
What is db2 command?
What is db2 bind process?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
What is the syntax for seeing the columns and data types of a table in the db2 database?
How many databases can be created inside an instance in db2 ?
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
What is the syntax for FETCH in DB2 ?