PL/SQL Working with Functions



--package

create or replace
package pkg_xyz is

  function fnc_varsayilan_cevap_kontrol (p_soru_id in number) return number;

end pkg_mzb;


--package body
create or replace
package body         pkg_xyz is

function fnc_varsayilan_cevap_kontrol (p_soru_id number) return number is
 
    varsayilanKontrol       number := 0;
 
    begin
     
        select count (varsayilan)
          into varsayilanKontrol
          from mzb_muayene_soru_cevaplari
         where soru_id = p_soru_id
         and varsayilan=1;
   
        return varsayilanKontrol;
                                       
        exception
            when No_Data_Found
            then
            return null ;
     
    end ;

end;

Comments

Popular posts from this blog

Solution for the fault: "System.Diagnostics.Process.Start is not working on IIS, but working on ASP.NET Development Server"

Solution for "Can not obtain Oracle client information from registry"