Posts

Showing posts from March, 2013

PL/SQL Functions

function fnc_my_function(p_id number) return number is
    v_counter       number := 0;

    begin

        select count(k.varsayilan)
        into v_count
        from test_table k
        where id=p_id;

        return v_counter;

        exception
            when no_data_found
            then
            return null ;

    end ;

-- Test the function


select package_name.fnc_my_function(65243)
from dual;