الانتقال إلى المحتوى
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.

index by table --nested table --varray -- multilev

Featured Replies

بتاريخ:

اود شرح هذه الاجزاء
index by table --nested table --varray -- multilev
بالنسبة لل collections مع معرفة الفرق بينهم

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

يا ريت حد يرد عليا لاني محتاجهم جدا

  • بعد 2 سنة...
بتاريخ:

السلام عليكم
انا بحمد الله اعرف
indexby,nestedtable,varray
بس مش عارفه
multi level
اولا indexby انت كانك بتعمل صفوف وكل صف ليه مفتاح وهو index والمفتاح ده مفتوح حجمه بحجم datatype اللى انت حددتها ليه مثلا

declare
type emp_table_type is table of
hr.employees%rowtype index by pls_integer;
my_emp_table emp_table_type;
max_count number(3):=104;
begin for i in 100..max_count
loop
 select * into my_emp_table(i) from hr.employees
 where employee_id=i;
end loop;
for i in my_emp_table.first.. my_emp_table.last
loop
 dbms_output.put_line(my_emp_table(i).last_name);
end loop;
end;
/


يعنى هو عرف Collectionو من النوع index by واسمها emp_table_type وعرف نوع البيانات اللى Collection ده حملها وهى من النوعrecord من جدولhr.employeesو عرف index ليها من النوع (وده لان
حجمه اقل من العادى)
pls_integer
ومن خلال الfor بدا عمل select لصف صف جوه ال الCollection اللى اسمه emp_table_type ويدخل الصف فى مكان معين بتحديد ال index للمكان المطلوب ونفس الكلام وهو بيعرض الخرج
كمان لاحظ بعض method تسهل العمل على index وهم
first,last,next(n),trim,delete,prior(n),exists(n),count
تيب الNested table
باختصار انه ذى indexby بس من غير مفتاح وهنشوف ازاى من خلال مثال

declare
type location_type is table of
hr.locations.city%type;
offices location_type;
table_count number;
begin offices :=location_type('bombay','Tokyo','Singapore','Oxford');
table_count :=offices.count();
for i in 1..table_count loop
dbms_output.put_line(offices(i));
end loop;
end;/


الشرح انه هنا عمل التعريف العادى بس من غيرindexby ولكن هو استخدمه من خلال يدخله البيانات من غير جمل واستخدم نفس method
اما الVarray ده مش مفتوح الطول ذىNested table,indexby هو انته بتحدد الحجم

TYPE location_type IS VARRAY(3) OF locations.city%TYPE;
offices location_type;


والسلام عليكم
واللهم استودعك ماحفظت ومافهمت فردده على يوم حاجتى وما توفقى الا بالله عليه توكلت واليه انيب

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

بتاريخ:

السلام عليكم ورحمة الله

شكرا لك على اسلوب الشرح المبسط ... مع الأمثلة

ننتظر منك مشاركات اخرى متميزة

جزاك الله خيرا

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

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

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

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

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

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.