الانتقال إلى المحتوى

ماذا نعني بمناداة الدالة


Azzamm51

Recommended Posts

You can call Function by put the output of the function on a variable which is the same type,
as the output of the function

example
let's say that we have function called get_name,which return the name of the employee as this

create or replace function get_name(p_empno number) return char is
v_name varchar2 emp.ename%type;
begin
select ename
into v_name
from emp
where empno = p_empno;
return v_name;
exception
when no_data_found then
return ('*****');
end;
-----
------
and now we are going to call this function first by select statment;

select get_name(empno) name
from emp;
---
---
----
and the other way is

declare
v_name varchar2(60);
begin
v_name := get_name(12);
end;

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية