oracle 中好象没有select * into 表名 from 。。。。

xzhzh 2004-07-26 09:13:34
oracle 中好象没有select * into 表名 from 。。。。
...全文
246 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
liangwqtps 2004-07-27
  • 打赏
  • 举报
回复
insert table1
select * from table2
要求两个表结构一样
gkwww 2004-07-27
  • 打赏
  • 举报
回复

同意楼上
luxuezhu 2004-07-27
  • 打赏
  • 举报
回复
create table 复制表名称 as select 语句
caral525 2004-07-27
  • 打赏
  • 举报
回复
你是针对MS SQL中的复制表语句:
select 字段列表 into 复制表名 from 表(复制表不存在)

ORACLE中对应的是
create table 复制表名称 as select 语句(复制表不存在)

功能一样,只是形式变了一下嘛
cuilk 2004-07-27
  • 打赏
  • 举报
回复
如果你没有建表权限可以用 create global temprorary table as
select * from tablename
on commit preserve rows
lxkim 2004-07-27
  • 打赏
  • 举报
回复
mark
北极海hein 2004-07-27
  • 打赏
  • 举报
回复
没错,oracle只有
create table tablename as select columnlists from othertable
这时oracle会根据select的columnlists来建立一个new table.

另外可以用insert into table select columnlists from othertable.
记得column 要对应好类型.

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧