时间:2021-07-01 10:21:17 帮助过:20人阅读
INSERT INTO tr_user_product_doctor (
user_id,
product_id,
doctor_id
) SELECT
user_id,
product_id,
‘doctorId‘
FROM
tr_product_user trpu
WHERE
trpu.user_id = ‘userId‘
说明:根据user_id 查询到相关的product_id,然后将其和后台传来的userId、doctorId传入tr_user_product_doctor 表中
sql语句学习
标签:gpo nbsp rod product _id into rom div bsp