insert into select 多个表

INSERT INTO user_auth(userid, auth_plane_id)

select user.user_id AS userid, plane.id AS auth_plane_id

FROM user, plane

WHERE user.name = '陈' and plane.name='737';

 

或者用join的方法.

posted @ 2019-01-27 11:12  ma_fighting  阅读(4337)  评论(0编辑  收藏  举报
历史天气查