1.建表:
(1)创建基本表二者是一致的
mysql:create table person(name varchar(10),age int)
db2: 同上。
(2)mysql支持在创建表的时候指定引擎和字符集,但是db2不支持
2.查看表
3.查看表结构
db2:select * from sysibm.columns where table_schema=current schema and table_name=’ams_wlck’;
4.删除表
5.修改表结构
alter table stu change name stu_no int;
alter table stu modify stu_no varchar(10) after math;
6.对数据的基本操作 二者基本一致,如果涉及到翻页mysql一般是limit关键词,而db2是fetch关键词,用法也不一样。db2也支持伪列。