Insert into select 和 select into from 区别
来源:互联网 发布:eclipse mac 图标小 编辑:程序博客网 时间:2024/04/27 22:12
SQlServer :
1.INSERT INTO SELECT语句
语句形式为:Insert into target_table (field1,field2,...) select value1,value2,... from source_table
要求目标表target_table 必须存在,由于目标表Table2已经存在,所以我们除了插入源表source_table的字段外,还可以插入常量。
2.SELECT INTO FROM语句
语句形式为:SELECT vale1, value2 into target_table from source_table
要求目标表target_table 不存在,因为在插入时会自动创建表target_table ,并将source_table中指定字段数据复制到target_table 中。
MySQL不支持Select Into语句直接备份表结构和数据:
执行:SELECT * INTO sms_log_216 FROM sms_log WHERE couponid LIKE '-216%'
出错:
Error Code : 1327
Undeclared variable: sms_log_216
Oracle 对于以上两个语句 target_table都必须存在 我们可以用一下语句代替
create table target_table as select value1,value2,... from source_table
- insert into select 和 select into from 用法和区别
- Insert into select 和 select into from 区别
- select into from 和 insert into select 区别
- select into from 和 insert into select 区别
- Insert into select 和 select into from
- select into from 和 insert into from 的区别
- insert into from和select from into的区别
- select into 和 insert into select区别
- SELECT INTO 和 INSERT INTO SELECT 区别
- select into 和 insert into from的区别
- insert .... select ... 和 select ...into from
- insert into select from
- insert into select from
- select into from 与 insert into select 区别
- select into from与insert into select区别
- select into from与insert into select区别详解
- select into from与insert into select区别
- select into from 与 insert into select 区别鉴赏
- 如何异步加载图片等数据?
- centos mysql双击热备
- c++模板类派生:派生类访问基类中的public 和protected成员的一些问题
- oracle循环
- MSN设置代理
- Insert into select 和 select into from 区别
- CSS中边偏移属性top,right,bottom,left
- SharePoint 权限提升的方法
- __asm__ __volatile__ 嵌入式内嵌汇编语法解构
- [python]wxPython学习记录3
- 导入Excel混同数据列数据丢失分析与解决
- linux route命令详解
- WinCE 6.0驱动编程中常用的API
- 编程之美_004硬币找零,递归算法