Home >Database >Mysql Tutorial >mysql mybatis返回插入的主键id_MySQL

mysql mybatis返回插入的主键id_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:39:26937browse

bitsCN.com
mysql mybatis返回插入的主键id [html]     insert into T_Company_Info (Company_Id, IsFranchisee, Company_Code, Company_Name)    values (#{companyId}, #{isfranchisee}, #{companyCode}, #{companyName})                SELECT LAST_INSERT_ID() AS ID              在执行插入之后执行,查询到 主键id[html] SELECT LAST_INSERT_ID() AS ID    通过对象 com.yjf.entity.TCompanyInfo.companyId  取得主键[java] company.getCompanyId()   bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn