输入banner图图片脚本导航/分类

SQL:insert来至select的数据

今天需要插入某条数据,但是该内容来至某条select语句,经过查询,得出以下结论

INSERT INTO `role_directory_rel`(`directoryId`, `roleId`) select id,1 from `directory` where `consoleUrl`=‘toCreateAwardPool.action‘;


注意前面要插入的数据需要和后面查询的参数个数对应

本文出自 “技术成就人生” 博客,请务必保留此出处http://2933246.blog.51cto.com/2923246/1763025

SQL:insert来至select的数据

标签:插入