之前在mysql中编辑,现在要移植到derby中,有些数据类型不兼容:
时间数据类型:
mysql版本:
create table JYS
(
ID int not null,
qsrq datetime,
zzrq datetime,
primary key (ID)
);
derby版本:
create table JYS
(
ID int not null,
qsrq TIMESTAMP,
zzrq TIMESTAMP,
primary key (ID)
);
datetime ----------> TIMESTAMP
自增主键:
mysql版本:
create table DW
(
id int not null auto_increment,
mc varchar(50),
primary key (id)
);
derby版本:
create table DW
(
id int generated by default as identity,
mc varchar(50),
primary key (id)
);
int not null auto_increment -----------------> int generated by default as identity
bool类型:
mysql版本:
create table YSPF
(
ID int not null,
tgsj bool,
primary key (ID)
);
derby版本:
create table YSPF
(
ID int not null,
tgsj varchar(1),
primary key (ID)
);
bool -------------------------> varchar(1)
http://db.apache.org/ddlutils/databases/derby.html
derby 数据类型
最新推荐文章于 2021-02-03 02:30:48 发布