Oracle 复制一条数据到同一张表

qq_27497567 2016-06-17 02:58:58
如题,但是表主键用的是序列,insert into test(id,b,c) select SEQ_test.nextval,select b,c from test where id=1 但是oracle 后面这个位置不让用序列,有什么好的解决方式么,存储过程也不会
...全文
1225 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
神临物语 2016-06-17
  • 打赏
  • 举报
回复
insert into test(id,b,c) select SEQ_test.nextval, b,c from test where id=1 这样应该就可以了吧
卖水果的net 2016-06-17
  • 打赏
  • 举报
回复
insert into test(id,b,c) select SEQ_test.nextval,select b,c from test where id=1 改成 insert into test(id,b,c) select SEQ_test.nextval,b,c from test where id=1

17,382

社区成员

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

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