1、说明:创建数据库

CREATE DATABASE database-name 

2、说明:删除数据库

drop database dbname

3、说明:创建新表

create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..)(根据已有的表创建新表) 
A:create table tab_new like tab_old (使用旧表创建新表)
B:create table tab_new as select col1,col2… from tab_old definition only

4、说明:删除新表

drop table tabname 

5、说明:增加一个列

Alter table tabname add column col type

注:列增加后将不能删除。DB2中列加上后数据类型也不能改变,唯一能改变的是增加varchar类型的长度

posted on 2014-04-10 11:05  苏荷酒吧  阅读(240)  评论(0)    收藏  举报