INTO
SELECT
INTO
SELECT
INTO
语句常用于创建表的备份复件或者用于对记录进行存档。
SQL
SELECT
INTO
语法
您可以把所有的列插入新表:
SELECT
*
INTO
new_table_name
[IN
externaldatabase]
FROM
old_tablename
或者只把希望的列插入新表:
SELECT
column_name(s)
INTO
new_table_name
[IN
externaldatabase]
FROM
old_tablename
标准SQL语句格式:
INSERT
INTO 表名(字段名)
select 字段名
from 表面
例子:将查询出的s表中sno,j表中jno,p表中pno插入spj表中
insert
into spj(sno,jno,pno)
select sno,jno,pno
from s,j,p
扩展资料:
删除语句:DELETE * FROM table_name
查询语句:SELECT * FROM Persons WHERE ROWNUM <= 5
建立视图:CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)