بتاريخ: 21 يناير 200719 سنة comment_89822 يا شباب اريد ان أعرف ما ال procdure والfunctionوكيف استخدمهم مع الامثلة لو سمحتموايضا مالمقصود بال package وكيف استخدمه بالله لو سمحتم امثلة ضروريييييييومشكوريييييييين وجزاكم الله خير الجزاء تقديم بلاغ
بتاريخ: 21 يناير 200719 سنة comment_89829 Procedure: A set of operations can be done using this.The parameters passed to the procedures includes "IN" operator and the result variables include "OUT".Eg: Create or replace procedure p1(a IN Number(2), b OUT Number(2))ISBegin......End;In the above procedure if u say something like b:=10.Then the value 10 is assigned to OUT variable b.U can execute it from directly in SQL prompt,Variable OU number(2);Set autoprint on;Execute p1( 10,:oU); The above 3 statements will execute & display the result.Function:It is similar to procedure but with small difference.Eg:Create or replace Function F1(a number(2)) return number IsBegin.......Return (some value or variable);End;For executingu shld say likeC:=F1(10);C will contain the output value.Package: Its like a folder where u cant put all related stuff inside.Procedure,Function,Common variables etc.So when u refer a procedure inside a package u shld prefix the procedure name with package name like{<package name>.<procedure name>}U can execute procedures inside package using execute statement itself.Variable OU number(2);Set autoprint on;Execute <package name>.p1( 10, U);Hope this gives u a clear picture. تم تعديل 21 يناير 200719 سنة بواسطة moody_4u تقديم بلاغ
بتاريخ: 22 يناير 200719 سنة كاتب الموضوع comment_89872 يا أخي مشكور على هذا الرد ولكن يا أخي انا عارف هذه الاشياء ولكن أريد تطيقها في مثال يعني أريد مثال على افانكشن ورنامج يستدعي هذا الفانكشن ورنامج على البروسيديور ويرنامج يستدعي هذ الروسيديورومثال ايضا على الباكج ومشكور على هذا الجهد تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.