insert into ultrax.pre_forum_post_tableid
(postid)
select data_post_id as postid
from kernels.csdn_discuz_topic_post
where data_post_id not in
(select postid from ultrax.pre_forum_post_tableid);
...全文
3005打赏收藏
Oracle 如何提高sql执行速度
insert into ultrax.pre_forum_post_tableid (postid) select data_post_id as postid from kernels.csdn_discuz_topic_post where data_post_id not in (select postid from ultrax.pre_forum_post_tableid);
insert into ultrax.pre_forum_post_tableid
(postid)
select data_post_id as postid
from kernels.csdn_discuz_topic_post a,
ultrax.pre_forum_post_tableid b
where a.data_post_id =b.post_id(+)
and b.post_id is null;