farmer111 发表于 2016-11-14 04:45:20

db2操作(取前十条、修改字段长度、增加字段)

db2取前十条记录 db2修改字段长度 db2增加字段方法

db2取前十条记录

db2 => select istop from news where id =370 fetch first 10 rows only

db2修改字段长度

db2 alter table db2admin.config alter cvalue set data type varchar(255)

db2 => alter table news alter AUTHOR set data type varchar(250)
DB20000I SQL 命令成功完成。
db2 => describe table news

db2增加字段方法

alter table table_name
add column column_name data type varchar(250)
页: [1]
查看完整版本: db2操作(取前十条、修改字段长度、增加字段)