zoukankan      html  css  js  c++  java
  • oracle的隐藏的东东

    1: 在oracle中存在一种特殊的表单:dual

    这是一张伪表,不是真正存在的

    在日期的查询和触发器等多处用到

    只展示系统当前时间:

    select sysdate from dual;

    触发器:往往是和序列在一起使用的,先创建序列,在调用序列设置触发器

    创建序列
    -- Create sequence 
    create sequence LX_CJ_XL
    minvalue 0
    maxvalue 100
    start with 2
    increment by 1
    nocache;
    创建触发器
    create or replace trigger Test
      before  
      insert 
      on lx_student
      for each row
    declare
      tmpVar number;
    begin
      tmpVar :=100;
      Select LX_CJ_XL.nextVal into tmpVar from dual;
      :New.id :=tmpVar;
    exception
      when others then
      raise;
    end Test;

     2:rownum  隐含的字段,查询的结果按照自然排序:,1,2,3,4,5,..............

  • 相关阅读:
    bzoj2791
    poi2012完成
    bzoj2795
    bzoj2790
    spring cloud 学习资源
    hystrix学习
    idea live template
    intellij-maven-imports-have-broken-classpath
    springboot elk实时日志搭建
    idea author模板
  • 原文地址:https://www.cnblogs.com/xiaoqisfzh/p/4749945.html
Copyright © 2011-2022 走看看