alter table itsm_incident drop column deparment_id
http://www.cnblogs.com/freshman0216/archive/2008/08/15/1268316.html
连接至数据库:
connect to <db-name> user <username> using password2.DB2数据库中的数据操作(导入导出)export to [path(例:D:"TABLE1.ixf)] of ixf select [字段(例: * or col1,col2,col3)] from TABLE1;export to [path(例:D:"TABLE1.del)] of del select [字段(例: * or col1,col2,col3)] from TABLE1;
导入表的数据
import from [path(例:D:"TABLE1.ixf)] of ixf insert into TABLE1
load from [path(例:D:"TABLE1.ixf)] of ixf insert into TABLE1;
3.导出数据库中所有表http://blog.csdn.net/zero_plus/article/details/6169520d
b2look -d itsmV6 -e -i -db2inst1 -w db2inst1 -o itsm.ddl
4.查询数据库中表名匹配syscat.tables
select * from syscat.tables where tabname like '%BASE%';
5.重组表
su - db2inst1
之前需db2 connect to ynv6td user db2inst1 using db2inst1
db2 reorg table itsm_ci_computer
6.alter table itsm_portal_widget_user drop primary key;
7.select * from itsm_incident fetch first 10 rows only;