发布网友 发布时间:2024-10-23 22:24
共1个回答
热心网友 时间:6分钟前
insert into a
select id from his where (cint(f1)+cint(f2)+cint(f3)=18) or id in(select top 1 id from his) union all
select id from his where (cint(f1)+cint(f2)+cint(f3)=18) or id in(select top 1 id from his order by fseq desc)
其实,加个union all 就可以实现2次查询结果在一个里面, 然后直接insert就可以了