Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2005

Tip: Looking for answers? Try searching our database.

How to I delete a column from a table in DB2 on AIX or Window Environment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cu ti - 24 Feb 2005 16:38 GMT
Hi
  I try to delete a column of the table but AIX - WIN db2
did not allow me to do this

    ALTER TABLE  table_name  DROP COLUMN   column_name

Does anyone know how to do it  please help

Thanks
Sean McKeough - 24 Feb 2005 18:05 GMT
If you're on v8, there's control center function available that will do
unload/reload etc steps to change your schema available (drop column is
not currently available via sql).

> Hi
>    I try to delete a column of the table but AIX - WIN db2
[quoted text clipped - 5 lines]
>
> Thanks
Dave Benjamin - 24 Feb 2005 21:35 GMT
> If you're on v8, there's control center function available that will do
> unload/reload etc steps to change your schema available (drop column is
> not currently available via sql).

And that function would be...?
Serge Rielau - 24 Feb 2005 22:41 GMT
>> If you're on v8, there's control center function available that will
>> do unload/reload etc steps to change your schema available (drop
>> column is not currently available via sql).
>
> And that function would be...?
Right click on the table
=> alter
=> select the column
=> click remove
Say Yes/OK for all warnings

Cheers
Serge

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Dave Benjamin - 24 Feb 2005 22:57 GMT
>>> If you're on v8, there's control center function available that will
>>> do unload/reload etc steps to change your schema available (drop
[quoted text clipped - 7 lines]
> => click remove
> Say Yes/OK for all warnings

Hmm... the remove button is always dimmed out for me.
DB2 8.1.7.445 on Windows.

Thanks for the reply, though!

Dave
Serge Rielau - 25 Feb 2005 04:04 GMT
>>>> If you're on v8, there's control center function available that will
>>>> do unload/reload etc steps to change your schema available (drop
[quoted text clipped - 14 lines]
>
> Dave
You have to select a column from the list, then the drop undimms :-)

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

RdR - 24 Feb 2005 22:57 GMT
The old favourite topic is back, the drop column question. The last time
this question poped up here, it created a long thread, in one of the threads
someone mentioned that the drop column feature for DB2 will be in Version 9
of DB2?

RdR

> Hi
>    I try to delete a column of the table but AIX - WIN db2
[quoted text clipped - 5 lines]
>
> Thanks
Serge Rielau - 25 Feb 2005 04:04 GMT
> The old favourite topic is back, the drop column question. The last time
> this question poped up here, it created a long thread, in one of the threads
> someone mentioned that the drop column feature for DB2 will be in Version 9
> of DB2?
>
> RdR
V9 What's that?

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Jan M. Nelken - 25 Feb 2005 05:30 GMT
> V9 What's that?

I am guessing that this would be next logical step to V8 - a vegetable juice
made from a blend of tomatoes, carrots, celery, beets, parsley, lettuce,
watercress, and spinach marketed by Campbell Soup Ltd.(see http://www.v8juice.com)

Care to speculate about 9th ingredient in V9? Anything alcohol based?

Jan M. Nelken
cu ti - 25 Feb 2005 16:10 GMT
Look like the only way to delete a collumn on db2 V8 is

1) export the table with out that column
2) drop all  contraint relate  to that  table
3) drop table

4) add table wit out that column
5) add contraints relate to that table back
6) import the file of step 1

any comments

>> V9 What's that?
>
[quoted text clipped - 5 lines]
>
>Jan M. Nelken
Serge Rielau - 25 Feb 2005 16:49 GMT
> Look like the only way to delete a collumn on db2 V8 is
>
[quoted text clipped - 7 lines]
>
> any comments
Correct for DB2 for LUW. TEh control center automates thse steps.
Including fixing up authorization dependent objects.

Cheers
Serge

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Mark A - 25 Feb 2005 18:08 GMT
> > Look like the only way to delete a collumn on db2 V8 is
> >
[quoted text clipped - 12 lines]
> Cheers
> Serge

I believe that DB2 V 8.2 is needed for the Control Center enhancements to
automate the dropping of a column. They use a stored procedure to do this,
so it could be done with a script if you could figure out the input parms.
Hint: use Show SQL in Control Center.
Serge Rielau - 25 Feb 2005 20:20 GMT
>>>Look like the only way to delete a collumn on db2 V8 is
>>>
[quoted text clipped - 18 lines]
> so it could be done with a script if you could figure out the input parms.
> Hint: use Show SQL in Control Center.

Well, if that fails one can alwasy read teh documentation ;-)
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.ud
b.doc/admin/r0011934.htm

The tooling team took great care to not force teh GUI onto anyone.
The goal is to allow ISVs to use the generated scripts to deploy version
 upgrades.

Cheers
Serge

Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Mark A - 25 Feb 2005 20:52 GMT
"Serge Rielau" <srielau@ca.ibm.com> wrote in message
> snip
> The tooling team took great care to not force the GUI onto anyone.
> snip
> Cheers
> Serge

Unfortunately, the development team has been a very good job of not forcing
the GUI onto anyone for a long time.

The GUI for OS/2 Database Manager (circa 1990) was much better.
Serge Rielau - 25 Feb 2005 21:10 GMT
> "Serge Rielau" <srielau@ca.ibm.com> wrote in message
>
[quoted text clipped - 8 lines]
>
> The GUI for OS/2 Database Manager (circa 1990) was much better.
Now that's a whole different can of tuna. ;-)
(Un)fortunately out of my control.

Cheers
Serge
Signature

Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Mark A - 25 Feb 2005 21:32 GMT
> Now that's a whole different can of tuna. ;-)
> (Un)fortunately out of my control.
>
> Cheers
> Serge

Can anyone from the Toronto Lab explain to me why it so difficult to build
the Control Center so that it remembers directory paths, for backup paths,
loads, etc (Separate paths for each function and each database)? This is GUI
101.

Every time a new DB2 release comes out, I pray for it to be there, but alas,
disappointment again in 8.2. It looks like they rewrote the directory path
browser, and it is a little better, but still slower than molasses, and it
can't remember directory paths from previous sessions.

The MS and Oracle marketing people are giddy with joy once again.
Dave Benjamin - 25 Feb 2005 22:04 GMT
>>>Look like the only way to delete a collumn on db2 V8 is
>>>
[quoted text clipped - 15 lines]
> so it could be done with a script if you could figure out the input parms.
> Hint: use Show SQL in Control Center.

I think you might be right. Even if I select a column in the "alter
table" screen, the "remove" button never un-dims. I'm using 8.1.

Dave
RdR - 25 Feb 2005 21:10 GMT
: ) and ; )

I thought you will slip up and give us some hints.

Have a nice weekend.

RdR

> > The old favourite topic is back, the drop column question. The last time
> > this question poped up here, it created a long thread, in one of the threads
[quoted text clipped - 3 lines]
> > RdR
> V9 What's that?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.