mysql mybatis返回插入的主键id_MySQL
程序员文章站
2022-06-04 08:23:44
...
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
mysql mybatis返回插入的主键id [html]