当插入值需要从另外一张表中检索得到的时候,如下语法的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. .net框架-数组

    .net框架所有数组均隐藏继承自System.Array. 数组有维数(Rank),长度(Length),元素类型(Element Type)基本属性. 数组基类System.Array: Array ...

  2. python - django (视图)

    # """ 一:# 视图 (接收请求返回响应的那部分) FBV版:基于 函数的 请求 CBV版:基于 类的 请求 注册方法: url(r'^add_publisher/' ...

  3. 04_(终结版)通过App实现对数据库的增删改

    设计思路:用户注册登录:用户注册或登录(login数据表),成功后进入增删改查(words数据表)注意:只有登录验证成功后才可以增删改查,否则提示未登录! 增:用户在App上add(单词.词义.音标) ...

  4. realloc()函数

    原型:extern void *realloc(void *mem_address, unsigned int newsize); 参数: mem_address: 要改变内存大小的指针名 newsi ...

  5. linux protobuf 测试官方例子遇到报错及解决办法。

    测试例子时出现报错如下,在最下面会写出安装流程. -------------------------------------报错----1------------------------------- ...

  6. phpstorm 2019.1 修改选中内容背景色,以及匹配的内容背景色

    #与选中内容匹配的内容背景色Editor -> Color Scheme -> General -> Code -> Identifier under caret #选中内容前 ...

  7. 批量添加解释-有单词没解释youdao

     下载地址:     有单词没解释 批量查询解释 当你有手里很多单词,数量很大比如500个及单词以上,那么一个一个去查询是相当麻烦的. 如果 有个软件实现批量查询然后将查询的结果添加到单词的后面,是不 ...

  8. css去除图片间隙

    问题如下图 把图片转换成块状元素即可 .img{ display: block; } 解决后:

  9. Thingsboard开发环境搭建及编译项目

    第一部分:JDK 1,下载JDK, JDK地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133 ...

  10. 深度学习面试题17:VGGNet(1000类图像分类)

    目录 VGGNet网络结构 论文中还讨论了其他结构 参考资料 2014年,牛津大学计算机视觉组(Visual Geometry Group)和Google DeepMind公司的研究员一起研发出了新的 ...