mybatis映射文件中三种设置id的方式



insert into users
values(#{userId},#{userName},#{userPwd},#{userAge},#{userSex},#{addr})





insert into
users(userName,userPwd,userAge,userSex,userAddr)
values(#{userName},#{userPwd},#{userAge},#{userSex},#{addr})







select LAST_INSERT_ID()

insert into
users(userId,userName,userPwd,userAge,userSex,userAddr)
values(#{userId},#{userName},#{userPwd},#{userAge},#{userSex},#{addr})

你可能感兴趣的:(后端,数据库)