oracle数据库:

为了使ID自增,建了序列后,创建触发器:

create or replace TRIGGER TRIG_INSERT_TRADE_RECODE
BEFORE INSERT ON TRADE_RECODE
FOR EACH ROW
BEGIN
  :NEW.ID:=SEQ_TRADE_RECODE.NEXTVAL;
END;

报错:

PL/SQL: Statement ignored

PLS-00357: Table,View Or Sequence reference 'SEQ_TRADE_RECODE.NEXTVAL' not allowed in this context

我明明记得以前这样做没问题啊,我打开以前的数据库一模一样啊。后来想了想,唯一的区别是我一个连的10g的一个是11g,上网一查果然是这个问题。

10g还不支持序列直接赋值给某一列,11g才支持,如果10g想要实现这样的功能,直接在insert语句中添加 :

insert into tablename values(SEQ_TRADE_RECODE.NEXTVAL,...);

PLS-00357: Table,View Or Sequence reference 'SEQ_TRADE_RECODE.NEXTVAL' not allowed in this context的更多相关文章

  1. iphone dev 入门实例1:Use Storyboards to Build Table View

    http://www.appcoda.com/use-storyboards-to-build-navigation-controller-and-table-view/ Creating Navig ...

  2. How To Make A Swipeable Table View Cell With Actions – Without Going Nuts With Scroll Views

    How To Make A Swipeable Table View Cell With Actions – Without Going Nuts With Scroll Views  Ellen S ...

  3. 制作一个可以滑动操作的 Table View Cell

    本文转载至 https://github.com/nixzhu/dev-blog Apple 通过 iOS 7 的邮件(Mail)应用介绍了一种新的用户界面方案——向左滑动以显示一个有着多个操作的菜单 ...

  4. Table View Programming Guide for iOS---(七)---Managing Selections

    Managing Selections 管理选择 When users tap a row of a table view, usually something happens as a result ...

  5. Table View Programming Guide for iOS---(五)---Creating and Configuring a Table View

    Creating and Configuring a Table View Your app must present a table view to users before it can mana ...

  6. Table View Programming Guide for iOS---(四)---Navigating a Data Hierarchy with Table Views

    Navigating a Data Hierarchy with Table Views 导航数据表视图层次 A common use of table views—and one to which ...

  7. Table View Programming Guide for iOS---(一)---About Table Views in iOS Apps

    About Table Views in iOS Apps Table views are versatile user interface objects frequently found in i ...

  8. 优化Table View

    优化Table View Table view需要有很好的滚动性能,不然用户会在滚动过程中发现动画的瑕疵. 为了保证table view平滑滚动,确保你采取了以下的措施: 正确使用`reuseIden ...

  9. Creating a Table View Programmatically

    https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TableView_iPhone/Cre ...

随机推荐

  1. [LeetCode] Insert into a Cyclic Sorted List 在循环有序的链表中插入结点

    Given a node from a cyclic linked list which is sorted in ascending order, write a function to inser ...

  2. AWS Nginx Started but not Serving AWS上Nginx服务器无法正常工作

    After install the Nginx on AWS instance, and visit your public ip address, you might see the followi ...

  3. [Codeforces Round #438][Codeforces 868C. Qualification Rounds]

    题目链接:868C - Qualification Rounds 题目大意:有\(n\)个题目,\(k\)个人,每个人可能做过这\(n\)个题里的若干道,出题方要在这\(n\)个题目里选若干个出来作为 ...

  4. en-zh(科学技术)science and technology-2

    研究:长期不吃早餐,患心脏病风险增加87% Skipping breakfast could raise risk of heart disease by 87% Skipping breakfast ...

  5. 如何追踪产生大量REDO的来源

    从10点到12点数据库中对象块变化排名靠前的对象 select to_char(begin_interval_time,'YYYY_MM_DD HH24:MI') snap_time, dhsso.o ...

  6. mysql数据库的查询,添加,删除,还原,备份

    18章数据mariadb数据库 1.setup 配置网卡centos6.52.nmtui 网卡图形配置界面3.yum install mariadb mariadb-server4.systemctl ...

  7. spring 相关注解详情(二)

    @Configuration用于定义配置类,可替换xml配置文件,被注解的类内部包含有一个或多个被@Bean注解的方法 /* 数据源的属性类 */ public class DataSourcePro ...

  8. 监听器 Listener

    监听器:监听某个对象状态的变化 被监听的对象:request.session.servletContext 监听对象的创建和销毁/对象属性的变化 ServletContext HttpSession ...

  9. 红黑树与AVL特性

    红黑树:比较平衡的二叉树,没有一条路径会比其他路径长2倍,因而是近似平衡的.所以相对于严格要求平衡的AVL树来说,它的旋转保持平衡次数较少.插入删除次数多的情况下我们就用红黑树来取代AVL. 红黑树规 ...

  10. FPGA小例子

    AND ---与门:OR --- 或门:INV --- 非门:NAND --- 与非门:NOR --- 或非门:XOR --- 异或门:XNOR ---同或门:MUX --- 数据选择器: 1.使用一 ...