https://blog.youkuaiyun.com/weixin_39415084/article/details/76170240
https://www.cnblogs.com/duanxz/p/5208336.html
-----------------------------------------------------------------------------------------------------------------
现在我想把t_cgs_sm_user表的userid(值不为1)插入到t_cgs_sm_user_role_res表中,
其他字段的值都一样,为‘4’,'res_global',6,'全局资源'
说明:带引号的字段是字符串类型
INSERT INTO t_cgs_sm_user_role_res (userid,roleid,resid,restype,resname)
SELECT userid,'4','res_global',6,'全局资源' FROM t_cgs_sm_user WHERE userid <> 1;
INSERT INTO t_cgs_sm_user_role_res
(userid,
roleid,
resid,
restype,
resname)
SELECT
userid,
'4',
'res_global',
6,
'全局资源'
FROM t_cgs_sm_user
WHERE userid <> 1;