zoukankan      html  css  js  c++  java
  • oracle调用函数的方式

    --方法1.PLSQL代码块

    SQL> set serveroutput on
    SQL> declare
    2 v_sal emp_pl.sal%type;
    3 begin
    4 v_sal :=get_sal(7902);
    5 dbms_output.put_line('7902的工资是'||v_sal);
    6 END;
    7 /
    --方法2.execute

    SQL> variable g_salary number
    SQL> execute :g_salary :=get_sal(7902) --不用分号
    --方法3.call

    SQL> var get_salary1 number
    SQL> call get_sal(7902) into :get_salary1; --需要用分号
    --variable同var
    --方法4.select

    SQL> select get_sal(7902) from dual;
    --方法5.将函数作为另一个子程序的参数
     

    SQL> execute dbms_output.put_line(get_sal(7902));
    ---------------------
    版权声明:本文为CSDN博主「ninn-sang」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_30934019/article/details/80557576

  • 相关阅读:
    mybatis的延时加载缓存机制
    mybatis03
    事务
    codeforces-200B
    codeforces-339B
    codeforces-492B
    codeforces-266B
    codeforces-110A
    codeforces-887B
    codeforces-69A
  • 原文地址:https://www.cnblogs.com/joingyb/p/11333684.html
Copyright © 2011-2022 走看看