当插入值需要从另外一张表中检索得到的时候,如下语法的sql语句已经不能完成该功能:
insert into my_table(id, name) values ((select seq_my_table.nextval from dual), ‘runto30′);

会报“ORA-02287: sequence number not allowed here”的错误,可以使用如下语句来完成:

insert into my_table(id, name) select seq_my_table.nextval, ' runto30 ' from dual;

或者是

insert into my_table(id, name) values( seq_my_table.nextval, ' runto30 ' )

From : http://zsjg13.iteye.com/blog/737677

ORA-02287: sequence number not allowed here问题的解决的更多相关文章

  1. InnoDB: The log sequence number in ibdata files does not match

    InnoDB: The log sequence number in ibdata files does not matchInnoDB的:在ibdata文件的日志序列号不匹配 可能ibdata文件损 ...

  2. mysql oom之后的page 447 log sequence number 292344272 is in the future

    mysql oom之后,重启时发生130517 16:00:10 InnoDB: Error: page 447 log sequence number 292344272InnoDB: is in ...

  3. [crypto][ipsec] 简述ESP协议的sequence number机制

    预备 首先提及一个概念叫重放攻击,对应的机制叫做:anti-replay https://en.wikipedia.org/wiki/Anti-replay IPsec协议的anti-replay特性 ...

  4. Sequence Number

    1570: Sequence Number 时间限制: 1 Sec  内存限制: 1280 MB 题目描述 In Linear algebra, we have learned the definit ...

  5. 理解TCP序列号(Sequence Number)和确认号(Acknowledgment Number)

    原文见:http://packetlife.net/blog/2010/jun/7/understanding-tcp-sequence-acknowledgment-numbers/ from:ht ...

  6. hzau 1205 Sequence Number(二分)

    G. Sequence Number In Linear algebra, we have learned the definition of inversion number: Assuming A ...

  7. Thread <number> cannot allocate new log, sequence <number>浅析

    有时候,你会在ORACLE数据库的告警日志中发现"Thread <number> cannot allocate new log, sequence <number> ...

  8. [转] 理解TCP序列号(Sequence Number)和确认号(Acknowledgment Number)

    点击阅读原译文 原文见:http://packetlife.net/blog/2010/jun/7/understanding-tcp-sequence-acknowledgment-numbers/ ...

  9. PHP内存溢出Allowed memory size of 解决办法

    PHP内存溢出Allowed memory size of 解决办法 博客分类: php   ============================Allowed memory size of  x ...

随机推荐

  1. maven基础整理

    转载:https://www.cnblogs.com/hzg110/p/6936101.html maven官网:http://maven.apache.org/index.html 一.为什么使用M ...

  2. HDU - 3555 - Bomb(数位DP)

    链接: https://vjudge.net/problem/HDU-3555 题意: The counter-terrorists found a time bomb in the dust. Bu ...

  3. Backpack V

    Description Given n items with size nums[i] which an integer array and all positive numbers. An inte ...

  4. ajax跨域-CORS

    CORS:跨域资源共享,是一种跨域访问的W3C标准,它允许浏览器可以跨源服务器进行请求,可以让ajax实现跨域访问.出现跨域问题的原因是浏览器同源策略导致的,协议+域名+端口三者一致被认为是同源.网站 ...

  5. [GCP] Goolge compute Engine

    Which of the following is a PAAS option for hosting web apps on GCP? App Engine standard or flexible ...

  6. (转载) 从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn)

    这一篇是从0开始搭建SQL Server AlwaysOn 的第三篇,这一篇才真正开始搭建AlwaysOn,前两篇是为搭建AlwaysOn 做准备的 步骤 这一篇依然使用step by step的方式 ...

  7. JS发送验证码;并设置cookie

    Tool.send_code = function(obj) { var isCheck = true, form = $('#editInfo_Form'); var mobile = form.f ...

  8. Transformer 比较好的博客

    1. https://www.jianshu.com/p/0c196df57323 细节理解: 2. https://zhuanlan.zhihu.com/p/44121378 3. https:// ...

  9. Day12:H5

    掌握HTML+CSS+JavaScript相关知识 了解HTML5的结构标签: 掌握新增和删去的标签及相关属性 运用HTML5相关知识进行实际开发 下面哪种语法中是对大小写进行区分的? XHTML H ...

  10. MATLAB曲线拟合函数

    一.多项式拟合 ployfit(x,y,n) :找到次数为 n 的多项式系数,对于数据集合 {(x_i,y_i)},满足差的平方和最小 [P,E] = ployfit(x,y,n) :返回同上的多项式 ...