使用mybatis generator后还能改变其中的代码吗
展开全部
1. 首先创建一个表:
Sql代码
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
2. 然后注入数据
Sql代码
insert into pet values('Fluffy', 'Harold', 'cat', 'f', '1993-02-04', null);
insert into pet values('Claws', 'Gwen', 'cat', 'm', '1994-03-17', null);
insert into pet values('Buffy', 'Harold', 'dog', 'f', '1989-05-13', null);
insert into pet values('Fang', 'Benny', 'dog', 'm', '1990-08-27', null);
insert into pet values('Bowser', 'Diane', 'dog', 'm', '1979-08-31', '1995-07-29');
insert into pet values('Chirpy', 'Gwen', 'bird', 'f', '1998-09-11', null);
insert into pet values('Whistler', 'Gwen', 'bird', null, '1997-12-09', null);
insert into pet values('Slim', 'Benny', 'snake', 'm', '1996-04-29', null);
insert into pet values('Fluffy', 'Harold', 'cat', 'f', '1993-02-04', null);insert into pet values('Claws', 'Gwen', 'cat', 'm', '1994-03-17',
Sql代码
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
2. 然后注入数据
Sql代码
insert into pet values('Fluffy', 'Harold', 'cat', 'f', '1993-02-04', null);
insert into pet values('Claws', 'Gwen', 'cat', 'm', '1994-03-17', null);
insert into pet values('Buffy', 'Harold', 'dog', 'f', '1989-05-13', null);
insert into pet values('Fang', 'Benny', 'dog', 'm', '1990-08-27', null);
insert into pet values('Bowser', 'Diane', 'dog', 'm', '1979-08-31', '1995-07-29');
insert into pet values('Chirpy', 'Gwen', 'bird', 'f', '1998-09-11', null);
insert into pet values('Whistler', 'Gwen', 'bird', null, '1997-12-09', null);
insert into pet values('Slim', 'Benny', 'snake', 'm', '1996-04-29', null);
insert into pet values('Fluffy', 'Harold', 'cat', 'f', '1993-02-04', null);insert into pet values('Claws', 'Gwen', 'cat', 'm', '1994-03-17',
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询