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



While creating a table, by mistake you have given size of one field as 10. But as per requirement ..

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

While creating a table, by mistake you have given size of one field as 10. But as per requirement ..

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

While creating a table, by mistake you have given size of one field as 10. But as per requirement ..

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

While creating a table, by mistake you have given size of one field as 10. But as per requirement ..

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

Post New Answer

More DB2 Interview Questions

pls tell me abt the normalization five types....

2 Answers  


What is the picture clause of the null indicator variable?

6 Answers  


What is meant by isolation level?

3 Answers  


What is db2? Explain.

0 Answers  


Which catalog table stores referential constraints?

1 Answers  


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

0 Answers  


In cobol+DB2program if the code of cobol program has changed than i have to do precompilation once again?

6 Answers   TCS,


While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?

0 Answers   JPMorgan Chase,


Can you use max on a char column?

0 Answers  


Where are plans stored?

2 Answers  


What is the database descriptor?

2 Answers  


What is a storage group (stogroup)?

0 Answers  


Categories