While creating a table, by mistake you have given size of one
field as 10. But as per requirement size should be 8. What is
your next step?
Answers were Sorted based on User's Feedback
Answer / hameed shaik
In Db29 we can alter the column size but cannot delete the column..
I did it so many times.. ALTER TABLE Tablename ALTER COLUMN columnname SET DATA TYPE VARCHAR(51)
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / mr.perfect
IF field is having empty in table , then we can reduce or
increase the size of the field, using the alter statement .
i.e . alter table <tablename>
modify <new columnname ><data type><new size>
if the data in the table is non-empyt, then we cannot alter
the table. better to delete the column and add the same
column to new size.
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / naidu sekhar yandrapu
once enter into column length ,we can increase the data length if a table is empty but if the table is non empty we can only
increase the(data length)
in this situation add one more column should be size is 8.
| Is This Answer Correct ? | 5 Yes | 6 No |
Answer / rahul
If table is empty then we alter this column to any length,
but if some data got inserted into the table then we can
also decrease the column length upto largest data size
available in that perticulat column.
| Is This Answer Correct ? | 1 Yes | 5 No |
what is difference between random and sequence file access
What is the purpose of the SDSNLOAD dataset in the STEPLIB while running DB2 programs?
How do u achieve record level locking in DB2 versions when record level locking is not allowed?
How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement
Can you tell me how can you find out the # of rows updated after an update statement?
how can we retrieve the 100 records of the file ?
What is subquery ?
Which component is responsible for processing sql statements and selecting access paths?
Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference
Where is the output of EXPLAIN stored?
Why db2 is called db2?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?