473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Drop column from table

How can I drop a column from an existing table:

CREATE TABLE table1 (column1 integer, column2 integer)

succeeds.

ALTER TABLE table1 DROP COLUMN column2

turns into an error "Error: [IBM][iSeries Access ODBC Driver]Operation
cancelled."

Specs:
- Database: DB2-database/ IBM OS400
- SQL Interface: Client Access ODBC Driver, version 9.00.07.00

Greetings, Twan Kennis
Nov 12 '05 #1
4 6992
I'm not familiar with DB2/400 but I think drop colum is also not
supported as that of UDB. have you check the sql referece?

Nov 12 '05 #2
ya there is no command to drop the column and we cannot trunacte the
data of the table also for that u have to recreate the table with the
required columns

Nov 12 '05 #3
You should be able to if you have ALTER privileage

http://publib.boulder.ibm.com/html/a...fzmstatabl.htm

Nov 12 '05 #4
Hello.

DB2/400 does support dropping a column but some strange way.
If you invoke this command from strsql utility (from 5250 terminal
window) you will notice, that it asks you something "are you sure you
really want to do this?" and will wait for your input. After you type
'I" symbol it will drop your column.
Since you can't invoke interactive sql commands from iSeries client
window, you can't successfully invoke this command from this window.
May be there is some way to adjust OS400 to invoke immediately dropping
a column without confirmation, but I don't know it...

Sincerely,
Mark B.

Nov 12 '05 #5

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

Similar topics

1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
1
by: Marion Jakob | last post by:
hi i'm using mssql server 2000 i want to remove a not null column constraint from the column answertext in table answertext. i tried the following line ALTER TABLE AnswerText ALTER COLUMN...
2
by: James Knowlton | last post by:
Hello, I'm just returning to MS SQL Server after two years of dealing with Sybase ASE. I need to drop a column, using the alter table command. I keep getting an error indicating that a...
2
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of...
1
by: Igor Kryltsov | last post by:
Hi, I have table: # \d category; category_id | integer | not null default nextval('public.category_category_id_seq'::text) category_name | character varying(100) | not...
1
by: Thomas Chille | last post by:
Hello! I have a Problem. A table with a ForeignKeyRef exits. The Name of the field with this FK-Constraint is 'id_employee' because it is referencing the field 'id_employee' in...
5
by: Markus | last post by:
I tried this: ALTER TABLE Dokumente DROP COLUMN docPrioID but I get this errormessage: DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: COLUMN;ABLE Dokumente DROP;CONSTRAINT
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
1
by: Gladiator | last post by:
Hi Team , Can some one tell me why we dont we have a DROP column or rename a column command in DB2 ? I Have a very Huge table and need to rename a column . The only option i have to do to rename...
4
by: Joseph | last post by:
Can i drop a cloumn from a table in DB2 for Z/OS?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.