473,604 Members | 2,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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


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

Nov 12 '05 #1
17 5310
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).

cu ti wrote:
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

Nov 12 '05 #2
Sean McKeough wrote:
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...?
Nov 12 '05 #3
Dave Benjamin wrote:
Sean McKeough wrote:
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

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4
Serge Rielau wrote:
Dave Benjamin wrote:
Sean McKeough wrote:
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


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

Thanks for the reply, though!

Dave
Nov 12 '05 #5
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
someone mentioned that the drop column feature for DB2 will be in Version 9
of DB2?

RdR
"cu ti" <c@yahoo.com> wrote in message
news:ch******** *************** *********@4ax.c om...

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

Nov 12 '05 #6
RdR wrote:
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?

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #7
Dave Benjamin wrote:
Serge Rielau wrote:
Dave Benjamin wrote:
Sean McKeough wrote:

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

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

Thanks for the reply, though!

Dave

You have to select a column from the list, then the drop undimms :-)

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #8
Serge Rielau wrote:

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
Nov 12 '05 #9

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
On Fri, 25 Feb 2005 00:30:58 -0500, "Jan M. Nelken"
<Un**********@I nvalid.Domain> wrote:
Serge Rielau wrote:

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


Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3603
by: php newbie | last post by:
I am getting error messages when I try to delete from a table using the values in the table itself. The intent is to delete all rows from TableA where col_2 matches any of the col_1 values. DELETE FROM TableA FROM TableA x INNER JOIN TableA y ON (x.col_1 = y.col_2) Error msg: The table 'TableA' is ambiguous. Can this be done with SQL or should I use T-SQL with cursors here?
16
17000
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums must be UPDATED, if not, they must be INSERTED. Logically then, I would like to SELECT * FROM <TABLE> WHERE ....<Values entered here>, and then IF FOUND UPDATE <TABLE> SET .... <Values entered here> ELSE INSERT INTO <TABLE> VALUES <Values...
16
3864
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but couldn't find anything. the context: we have some java folk who like to parametize/
1
2824
by: Matthew Wells | last post by:
I want to delete records from the "one" table of a one to may relationship. There are no actual Access relationships set up. The "one" table has a single field PK and the "many" table has a two field PK. This code works when executed from a module (both DAO and ADO work), but not from the query window. DELETE a1.*, a2.Field1 FROM a1 LEFT JOIN a2 ON a1.Field1 = a2.Field1 WHERE (((a2.Field1) Is Null));
3
2783
by: vcornjamb | last post by:
Hello, I am developing a web form that contains some buttons and a data grid which has as its last column link buttons that will delete the data associated with that row. Everything works fine, but users have requested a confirmation message pop up so the user can confirm the delete. I can not quite get this to work. Here are the facts: I am working in the Microsoft Development Environment 2003 (Version
0
1495
by: laurent | last post by:
Environment: VS NET 2003 Fr Framework: 1.1 OS: WinXP SP2 Fr Hello I have a problem to add with pop-up and to delete in a datagrid(ButtonColumn delete) on WebForms. code button HTML which opens pop-up: <INPUT class="buttonForm" onclick="MM_openBrWindow('../pages/recherche_ar.aspx?a=2','AR','width=700,height=500,scrollbars=yes,resizable=yes')"
9
3574
by: nnelson | last post by:
I have a base customer table of 2 million records. We're doing some testing and I added 33000 rows incorrectly. No biggie, we'll just delete them, right? Nope....9 hours later, process is still running using this query. delete from customer where custid in (select custid from #tmp1) k...so we'll change it. delete from customer where custid > 2295885
6
3846
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called "Generations"), and it allows the user to add, edit and delete the various records of the table. "Generations" table has the following fields: "IDPerson", NamePerson", "AgePerson" and "IDParent". A record contains the information about a person (his name, his...
8
2973
by: Michel Esber | last post by:
Hello, Env: DB2 V8 LUW FP16 running Linux create Table X (machine_id varchar(24) not null, ctime timestamp not null); create index iFoo on X (MACHINE_ID, CTIME) allow reverse scans; alter table X add primary key (MACHINE_ID, CTIME); Our C++ application inserts data into a table X using CLI array insert
0
7929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8406
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8065
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5882
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3906
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3954
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2433
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.