Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How we create a tables in DB2 ?Previously client has using
7 letters for user id,now he wants to increase the letters
from 7 to 12 for user id.How we can do it?

Answers were Sorted based on User's Feedback



How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to i..

Answer / anish

for the 1st question:
v can create table by the COMMAND
CREATE TABLE table-name
column1 char(9)
.
.
...so on
And according to your installation u have to mention the
tablespace name & DB name.

for the 2nd question:
ALTER TABLE table-name
MODIFY USER_ID CHAR(12);

Is This Answer Correct ?    6 Yes 1 No

How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to i..

Answer / shailendra

i think, the size of variable is not possible to change,
please correct me if i am wrong.

so for the solutionwe can creat new table with change of
the size of user_id char(12)


and if you want the same name of table
step1 >creat a table for interface perpose with user_id char
(12)

2> insert all the data in the interface table
3> delete the main table.
4> create table with same name of main table with
user_id char(12)
5> insert data from interface table to main table.


now i think it will work.

Is This Answer Correct ?    3 Yes 1 No

How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to i..

Answer / guest

It is always possible to increase the size of the variable.
It is not possible to decrese the size.

Is This Answer Correct ?    2 Yes 1 No

How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to i..

Answer / ram prajapati

in any other database it is possible to alter the size of
the table's column but it is not possible do it in db2.
no modify command is there in db2 to be used in the
respective sql.
i'm a bit too sure about it so plz correct me when i'm wrong
with a reference link.plz.

Is This Answer Correct ?    1 Yes 0 No

How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to i..

Answer / ratheesh nellikal

Hi Ram Prajapati ,

In db2 (esp in version 9.5) it is poosible to increase the
size of a column without loosing the data.
But u can not decrease the size.

Cheers ,
Ratheesh Nellikkal

Is This Answer Correct ?    1 Yes 0 No

How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to i..

Answer / hi

Yes, it's possible to increase/decrease the size. While
decreasing, need to make sure that none of the records
present in the column conflict the modification. e.g. to
reduce the size of the column which is CHAR(6) to CHAR(4),
with one of the record value as 'ABCDE' will give an error.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More DB2 Interview Questions

In db2, how do you insert multiple rows in 1 query using a.) Cursors, b.) Normal query?? Give syntax for both.

5 Answers   CTS,


what are the copybook changes generally we done?can anyone tell me......... Thanks in advance........

1 Answers  


What's the Maximum Length of SQLCA and what's the content of SQLCABC?

2 Answers  


can any one expalin check point with an example?

1 Answers  


how to resolve -805. give clear explination for that

2 Answers   IBM,


My cobol program(not having any sql statements) is calling another cobol program ( having sql statements), what is needed for compilation and run in jcls .

3 Answers   Cap Gemini, RBS,


When the like statement is used?

0 Answers  


Which is faster delete or truncate?

0 Answers  


Is db2 a mainframe database?

0 Answers  


WHAT IS NULL INDICATOR ? WERE IS THIS USED? AND IF IT IS USED IN FILES CONCEPT? HOW DO WE USE IT?

2 Answers   IBM,


What is db2? Explain.

0 Answers  


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

0 Answers  


Categories