sql—如何在mysql中使用select查询将数据插入多个表

ryoqjall  于 2021-06-17  发布在  Mysql
关注(0)|答案(0)|浏览(217)

我该怎么办 insert 使用 select query ?

INSERT INTO PermissionRole(code,isValid,longValue,shortValue),
INSERT INTO PermissionRole_authorisedFunctions 
VALUES(LAST_INSERT_ID(),brfm.authorisedFunctionCode)
SELECT urt.code, urt.isValid, urt.longValue, urt.shortValue, brfm.authorisedFunctionCode 
FROM Ref_UserRoleType urt 
INNER JOIN ref_businessrolefunctionmap brfm
ON urt.code=brfm.businessRoleCode;

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题