论坛首页 入门技术论坛

SQL:returning A into B/函数参数默认值/手动更改表值

浏览 1587 次
该帖已经被评为新手帖
作者 正文
   发表时间:2008-04-08   最后修改:2009-02-26
(1)returning  A into B
update work_order wo
           set wo.start_qty = nvl(wo.start_qty, 0) + 1
         where wo.order_type = 'ATO'
           and wo.exception_flag = 0
           and wo.order_number = p_work_order
        returning wo.start_qty into v_start_qty;
returning  A into B:
      A is the top DML of parameter
      B is the we define variable.
      Give A value to variable B
    
     The fuction is to account for subsequent
(2)函数参数默认值
v_pid       varchar(10) := get_pid(p_psn);

      function get_pid(p_psn   in varchar2,
                            p_valid in pls_integer := 1)
    
     The p_valid in pls_integer := 1  effect  is 
     When user the get_pid no p_valid then it default 1.
      The p_valid¡¨ is dispensable
(3)手动更改表值
select  s.*,rowid from student s;

论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics