码迷,mamicode.com
首页 > 数据库 > 详细

SQL把一个表里的数据赋值到另外一个表里去

时间:2018-01-18 10:18:54      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:server   serve   body   rom   from   rac   bsp   com   div   

--sqlserver
--目标表存在
insert into 目标表 select * from 原表;
--目标表不存在
select * into 目标表 from 原表;



--oracle
--目标表存在
insert into 目标表 select * from 原表; 
commit;

--目标表不存在
create table 目标表 as select * from 原表;

 

SQL把一个表里的数据赋值到另外一个表里去

标签:server   serve   body   rom   from   rac   bsp   com   div   

原文地址:https://www.cnblogs.com/lxh520/p/8308705.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!