Sunil,
  I went to CODUG seminar yesterday and the speaker did talked about Features and Functions in V8. One of the slide I remember was about Schema Evolution where he talked about Larger numeric(means convert column to larger numeric size). His talk was on z/Os server(mainframe). We are here on V7, personally I was putting his views as I interpreted.
I checked some manuals out here but my luck ran out like yours.
Syed
 
-----Original Message-----
From: Sunil Inchal [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 2:57 PM
To: Fazal, Syed (TATA); [EMAIL PROTECTED]
Subject: Re: [DB2EUG] ALTER TABLE QUESTION

I'm using version 8.1 Enterprise Edition server. But I couldn't alter from SMALLINT to DECIMAL(16,2)
----- Original Message -----
Sent: Thursday, April 03, 2003 2:51 PM
Subject: RE: [DB2EUG] ALTER TABLE QUESTION

With DB2 you can only Alter a Column data type of Data type CHAR but to change it from other Data type you need to drop the table and recreate it. In case of V8 you can do an alter of the column but still there is a restriction of Alter. In case of V8 you can alter a column like you want from SMALLINT to DECIMAL(16,2) but only the new data type should be larger  than the old data type.
 
-----Original Message-----
From: Sunil Inchal [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 2:38 PM
To: [EMAIL PROTECTED]
Subject: [DB2EUG] ALTER TABLE QUESTION

Hi group,
 
How do I alter column type and drop a column in DB2 using ALTER TABLE or any other command?
I read in the documents that only columns with CHAR type could be altered using
ALTER TABLE <tabname>
ALTER COLUMN <column>
....
 
I want to change a SMALLINT datatype to DECIMAL(16,2). Also I need to drop an existing column.
In Informix IDS it is a very easy to perform the above using ALTER command. But I don't know how to do it in DB2.
Finally, what I did was backed up data using EXPORT utility, dropped the table and recreated with changed schema and reloaded the data using LOAD utility.
Are there any other ways to do it?
 
Thanks and regards
 
Sunil
 

Reply via email to