Phil, Thanks for your comment. I did replied to one of Sunil mail saying that the feature talked about was on z/Os which is mainframe. Hopefully they implement it on LUW in the next release. I work on Mainframe but do support DB2 features on LUW but not extensively. Would be happy to see a feature to alter the column in Mainframe in V8. Syed
-----Original Message----- From: Philip Nelson [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 4:18 PM To: Fazal, Syed (TATA) Cc: 'Hallin, Tomas (HQP)'; 'Sunil Inchal'; [EMAIL PROTECTED] Subject: RE: [DB2EUG] ALTER TABLE QUESTION Syed, I think you are mixing up your DB2s. The ability to alter column lengths is one of the features announced for V8 of DB2 for z/OS (i.e. mainframe), not for DB2 for LUW. Phil On Thu, 2003-04-03 at 21:35, Fazal, Syed (TATA) wrote: > Tomas, > Well I also checked the manual but as I was in the seminar about the > V8 Functions and Features, we were told that we can do it. But I would > guess it may be a feature in V8+1. But I still have a copy of the > presentation and his explanation about one of them was that we can > change a column type from a smaller size to a larger size. > There are some features for which he said when you migrate you need to > drop and recreate it to take into affect in z/Os I don't know if that > holds good for other platform. Also the talk about the feature was in > z/Os. > Thanks, > Syed > -----Original Message----- > From: Hallin, Tomas (HQP) [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 3:22 PM > To: 'Fazal, Syed (TATA)'; 'Sunil Inchal'; [EMAIL PROTECTED] > Subject: RE: [DB2EUG] ALTER TABLE QUESTION > > > You can? How? The V8 manual still states that the only data > type change that can be done with ALTER TABLE is to extend > VARCHARs. A bunch of other stuff can be done in the ALTER > COLUMN clause, but I don't see anything that would support > converting a smallint to a decimal, for instance. > > /T > > Tomas Hallin > Database Administration > Robert Half International > Pleasanton, CA > -----Original Message----- > From: Fazal, Syed (TATA) > [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 03, 2003 11:51 AM > To: 'Sunil Inchal'; [EMAIL PROTECTED] > 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 > -- Philip Nelson <[EMAIL PROTECTED]> ScotDB Limited - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc
