ÓÐÁ½¸ö±íA±íºÍB±í
Ôõô°ÑA±íÖеÄÒ»Ðзŵ½B±íÖÐ
insert into b select cola ,colb ,colc from a where cola=***
insert into b (col1,col2,...,coln)
select col1,col2,...,coln from a
where ...;
commit;
×¢Òâ¶ÔÓ¦ÁÐÊý¾ÝÀàÐÍÓ¦¸ÃÒ»Ñù¡£
insert into b (id,code,name,...)
select id,code,name...from a
where id=?
insert into b (col1,col2,...,coln)
select col1,col2,...,coln from a
×¢ÒâÊý¾ÝÀàÐÍ
¿ÉÒÔexp µ¼³öÀ´£¬ÔÚimp µ¼Èë½øÈ¥¡£¡£¡£
insert into b (id,code,name,...)
select id,code,name...from a
where id=?
SQL code:
merge into B using A on(A.col1=B.col1)
when not matched then insert(B.col1,B.col2) values(A.col1,A.col2)
ÓÃunion¿ÉÒÔÂð£¿
ÎÒÔÚ¿ª·¢µÄÕâ¸öÓ¦Óò¢·¢ÐԱȽϸߣ¬oracle¸üÐÂÊý¾ÝʱºòÈçºÎ´¦Àí²¢·¢´¦ÀíÄØ£¿¸÷λ´óÏÀ·¢±íºÃµÄ¹Ûµã°¡£¬ÔÚÏߵȴý£¡
oracleÊý¾Ý¸üÐÂʱ£¬»á×Ô¶¯Ä¬ÈÏÐÐËø¶¨£¬Â¥Ö÷²»Òª²ÙÐÄ£¬Oracle¶Ô²¢Ðд¦ÀíÒѾºÜ³ÉÊìÁË
ÒýÓÃ
oracle ......
¿´µ½ÓÐÒ»¸öSUNµÄÔªÀÏ´ÓOracle¹«Ë¾´ÇÖ°£¬¶øÇÒÊÇJava´´Ê¼ÈË——´óÃû¶¦¶¦µÄJames Gosling£¬
ÐÄÖÐÏ൱ÊÜ´ò»÷£¡ºÜ±¯Í´£¡
OrableÕâÊÇÔõôÁË£¬ÄѵÀÕâ¾ÍÊÇËùνµÄÈںϣ¨Ö«½â£¬·Ö»¯£¬Ïûʧ£©Âð£¿
SUNµÄÒ»°ïÀÏÔ±¹¤¶ ......