导数据时用到的SQl语句
1。
将一个表的数据插入到另一个表中
insert into Tab_a(f_a1,f_a2)
select f_b1,f_b2 from Tab_b where f_b1 >='02400001' and f_userid<='02700000'
2。
将一个表的某一个列统一替换
update tab_a set tab_a.f_a1=tab_b.f_b2
from tab_a,tab_b
where tab_a.f_a1=tab_b.f_b1
将一个表的数据插入到另一个表中
insert into Tab_a(f_a1,f_a2)
select f_b1,f_b2 from Tab_b where f_b1 >='02400001' and f_userid<='02700000'将一个表的某一个列统一替换
update tab_a set tab_a.f_a1=tab_b.f_b2
from tab_a,tab_b
where tab_a.f_a1=tab_b.f_b1-
- DeepSought
- 探索AI融入千行百业与日常生活
浙公网安备 33010602011771号