当插入值需要从另外一张表中检索得到的时候,如下语法的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. RestTemplate将字符串以文件的方式上传

    背景 在java后台将内容拼接为字符串,然后使用RestTemplate将字符串以文件的方式上传到指定接口 思路 使用 RestTemplate 时,将字符串封装为字节流,然后上传 代码 /** * ...

  2. Mysql 基础 1

    MySQL基础 1.概念 数据库,为我们提供高效.便捷的方式对数据进行增删改查的工具 优势 程序稳定.数据一致性.并发.效率 2.数据库管理系统 (DataBase Management System ...

  3. Greenplum failed segment的恢复方法--primary与mirror都可修复

    当在使用greenplum过程中有不当的操作时,可能会出现segment节点宕掉的情况(比如在greenplum运行的过程中停掉其中几台segment节点的服务器),通过下面的方法可以恢复segmen ...

  4. Spark设置自定义的InputFormat读取HDFS文件

    本文通过MetaWeblog自动发布,原文及更新链接:https://extendswind.top/posts/technical/problem_spark_reading_hdfs_serial ...

  5. mysql 使用的三个小技巧

    mysql 使用的三个小技巧 快速阅读 Mysql查询工具中如何查询多条语名,Mysql中如何设置变量,Mysql中如何查特定字段,后面再加* Mysql查询工具中如何查询多条语名 默认myslq只能 ...

  6. nodejs express cheerio request爬虫

    const express = require('express') const cheerio = require('cheerio') const request = require(" ...

  7. De1ctf - shell shell shell记录

    虽然是N1CTF原题,但是自己没遇见过,还是做的题少,记录一下吧== 1.源码泄露,直接可以下到所有源码,然后代码审计到一处insert型注入: 这里直接带入insert里面,跟进去看看 insert ...

  8. markdown 插入链接

    插入链接 []里面写链接的标题或描述,可以省略不加不写 , () 里面是链接,必须有必须写 例如 [百度](https://www.baidu.com) 百度 参考文章 Markdown 插入链接

  9. php 502 无错误行和报错文件的情况下使用gdb调试方法

    lnmp环境 gdb  /usr/local/php5.2/bin/php-cgi  /tmp/coredump-php-cgi.20503 source /home/tmp/lnmp1.4-full ...

  10. android x86 安装

    1.下载页面 http://www.android-x86.org 下载了: android-x86-8.1-r2.iso 用Win32DiskImager制作usb启动盘. 参考: https:// ...