主要用cross join 就可以查询出这积
insert into tbmcd_config_city_perform
(editor,edittime,city_id,post_id,perform_id,change_value)
select '{0}','{1}', 0, post_id ,perform_id,'0.00'
from (select id as post_id from tbmcd_position where id={2})a
cross join (select id as perform_id from tbmcd_perform) b
关系两个表进行二维信息SQL中cross join
最新推荐文章于 2024-06-25 08:57:14 发布