一:如果要插入目標表不存在:
select * into 目標表 from 表 where ...
二:如果要插入目標表已經存在:
insert into 目的表 select * from 表 where 條件
三:如果是跨數據庫操作的話: 怎么把A數據庫的atable表所查詢的東西,全部插入到B 數據庫的btable表中
select * into B.btable from A.atable where ...
同樣,如果是跨服務器的,也是可以的。
一:如果要插入目標表不存在:
select * into 目標表 from 表 where ...
二:如果要插入目標表已經存在:
insert into 目的表 select * from 表 where 條件
三:如果是跨數據庫操作的話: 怎么把A數據庫的atable表所查詢的東西,全部插入到B 數據庫的btable表中
select * into B.btable from A.atable where ...
同樣,如果是跨服務器的,也是可以的。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。