Alter table tabname add column col type
只能增加一个列
注:列增加后将不能删除。DB2中列加上后数据类型也不能改变,唯一能改变的是增加varchar类型的长度。作者: zhangchen 时间: 2007-5-31 20:11 楼上的说的不对。
add和drop是可以在同一句“alter table”语句下同时对多个字段进行操作的,只有alter不能,需要分句写。
要实现LZ所说的,则
alter table lwl
add new1 int not null, new2 int not null