对mysql的批量插入数据语法小结一下。

1 准备要插入的数据。
select 124910,  432, aa.userid  from (select userid from `pcore_vcard_00` where eid=124910) as  aa;

2 开始批量插入。
insert into `pcore_emp_sharedir_permission_00`( `eid`,  `dir_id`,  `userid`) select 124910,  432, aa.userid  from (select userid from `pcore_vcard_00` where eid=124910) as  aa;

easyですよ。

你可能感兴趣的:(mysql,insert)