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 |
This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects rows for employee 'A', it should perform a paragraph s001-x if employee 'A' is present. In this case it gets -811 sqlcode, but still it process the paragraph s001-x. What could be wrong in my code.
Can there be more than one cursor open for any program?
In SPUFI suppose you want to select maximum of 1000 rows, but the select returns only 200 rows. What are the 2 SQLCODEs that are returned?
What is the difference between group by and order by?
Mention some fields that are a part of sqlca.
In a DB2-CICS program which is acts as co-ordinator and which is participant?
What is DCLGEN ?
What is the maximum size of varchar data type in db2?
what is the use of bind parameter, Replace?
what is the Foreign key? explain?
Can we declare DB2 HOST variable in COBOL COPY book?
What is the cascade rule and how does it relate to deletions made with a subselect?