Db2 V9 supports dropping column. For V8 you have to export/recreate table /import.
--Rahul Singh
-----Original Message-----
From: satish [mailto:db2udbdba-ezmlmshield-x45621230.[Email address protected]
Sent: Tuesday, August 29, 2006 5:36 PM
To: LazyDBA Discussion
Subject: does drop column command works in db2
Please let me know if any version of db2 allows a drop colmn,as does
oracle.I want do delete a colmn that i just created and doesn't have any
value.
Please let me know if it can be done in any way other than the export
import route.
----- Forwarded by satish.sahoo/Polaris on 08/29/2006 05:33 PM -----
|---------+--------------------------------------------------------->
| | "Saarthak " |
| | <db2udbdba-ezmlmshield-x57183365.[Email Address Removed] | azyDBA.com> |
| | |
| | 08/29/2006 05:36 PM |
| | |
|---------+--------------------------------------------------------->
>-----------------------------------------------------------------------------------------------|
| |
| To: "LazyDBA Discussion" <[Email address protected] |
| cc: (bcc: satish.sahoo/Polaris) |
| Subject: Updateable View |
>-----------------------------------------------------------------------------------------------|
Hi All,
Can we perform an update / insert operation a view (which is made up of a
join between 2 tables).
For Eg:
create table employee (empno int not null primary key, ename varchar(32),
deptno int not null);
create table department (deptno int not null primary key , dept_name
varchar(32));
alter table employee add foreign key(deptno) references department(deptno);
create view emp_dept as select e.empno, e.ename, d.deptno from employee e,
department D where e.deptno=d.deptno;
Now if I write,
Update emp_dept set ename='JIT' where empno=1;
I get an error:
DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL0150N The target fullselect, view, typed table, materialized query
table,
or staging table in the INSERT, DELETE, UPDATE, or MERGE statement is a
target
for which the requested operation is not permitted. SQLSTATE=42807
============================================================================================================================
Tech Mahindra, formerly Mahindra-British Telecom.
Disclaimer:
This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may
review at <a href="http://www.techmahindra.com/Disclaimer.html
">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="
http://tim.techmahindra.com/Disclaimer.html
">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech
Mahindra.
============================================================================================================================
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit us at http://www.polaris.co.in
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page