Rob*_*uld 125 sql oracle ora-00905
我正在尝试使用Oracle进行SELECT INTO.我的查询是:
SELECT * INTO new_table FROM old_table;
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误:
SQL Error: ORA-00905: missing keyword
00905. 00000 - "missing keyword"
Run Code Online (Sandbox Code Playgroud)
有什么想法有什么不对吗?
上面的标准行为应该像我最初的想法一样:但是Oracle在他们自己的方言中实现了它完全不同的SQL Docs on Insert ...选择
APC*_*APC 267
如果NEW_TABLE已经存在则...
insert into new_table select * from old_table
/
Run Code Online (Sandbox Code Playgroud)
如果你想根据OLD_TABLE中的记录创建NEW_TABLE ...
create table new_table as select * from old_table
/
Run Code Online (Sandbox Code Playgroud)
wal*_*lyk 29
select into在pl/sql中用于将变量设置为字段值.相反,使用
create table new_table as select * from old_table
Run Code Online (Sandbox Code Playgroud)
小智 5
用:
create table new_table_name
as
select column_name,[more columns] from Existed_table;
Run Code Online (Sandbox Code Playgroud)
例子:
create table dept
as
select empno, ename from emp;
Run Code Online (Sandbox Code Playgroud)
如果表已经存在:
insert into new_tablename select columns_list from Existed_table;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
345103 次 |
| 最近记录: |