الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

الفرق بين Procedure و Function

Featured Replies

بتاريخ:

يا شباب اريد
ان أعرف ما ال procdure والfunction
وكيف استخدمهم مع الامثلة لو سمحتم



وايضا مالمقصود بال package وكيف استخدمه بالله لو سمحتم امثلة ضرورييييييي


ومشكوريييييييين
وجزاكم الله خير الجزاء

بتاريخ:

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))IS
Begin
......

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 Is
Begin

.......
Return (some value or variable);
End;

For executing
u shld say like
C:=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, :rolleyes: U);

Hope this gives u a clear picture.

تم تعديل بواسطة moody_4u

بتاريخ:
  • كاتب الموضوع

يا أخي مشكور على هذا الرد

ولكن يا أخي انا عارف هذه الاشياء ولكن أريد تطيقها في مثال

يعني أريد مثال على افانكشن ورنامج يستدعي هذا الفانكشن ورنامج على البروسيديور ويرنامج يستدعي هذ الروسيديور





ومثال ايضا على الباكج

ومشكور على هذا الجهد

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

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

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

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

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

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.