select into
来源:互联网 发布:配乐朗诵的软件 编辑:程序博客网 时间:2024/05/29 00:34
SQL SELECT INTO 语句可用于创建表的备份复件。一个表中选取数据,然后把数据插入另一个表中。语句常用于创建表的备份复件或者用于对记录进行存档。
--- 1. insert into select (oracle中也可以用)
--- 注意:<1> 目标表(test_dept)必须存在
-------- <2> 可以向目标表(test_dept)中导入常量。
insert into test_dept(id,dept_name) select '00000000000000000000000000000000','张三' from zhonghq_dept;
--- 2. select into from
select id,name into test_dept from zhonghq_dept;
--- 注意:目标表不能存在(test_dept)
------ : oracle 数据库中不能使用,可以用 create table from 代替
例如:create table test_dept as select b.id,b.dept_name from base_dept b;
------ : 可以向目标表(test_dept)中导入常量。
create table test_dept(id,dept_name) as select id,dept_name from zhonghq_dept;
create table test_dept(id,dept_name) as select '00000000000000000000000000000000','张三' from zhonghq_dept;
- select into
- select into
- select into
- SELECT...INTO
- select into 和 insert into
- insert into 与 select into
- select into 与 insert into
- ORALCE: Select into VS Insert into select
- SELECT...INTO 以及insert into...select总结
- MySQL select into 和 SQL select into
- insert into select和 select into用法
- select into 和 insert into select区别
- MySQL select into 和 SQL select into
- Insert into select and select into
- select into 与 insert into select
- select into 和insert into select
- Insert into select 和 select into from
- SELECT INTO 和 INSERT INTO SELECT
- XMPP Technologies Overview
- [Android]Android权限列表
- <转>二十六个月Android学习工作总结(2013-05-02更新)
- like 用法
- Python特殊语法:filter、map、reduce、lambda
- select into
- Objective-C中的@property和@synthesize用法
- Python函数式编程指南(一):概述
- WCF学习心得
- 上溢与下溢
- union 用法
- 启用动态NVI的NAT的配置步骤及示例
- Ubuntu 12.04(所有ubuntu发行版都适用)sudo免输入密码
- Python函数式编程指南(二):函数