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

واجب :cursor لعرض أعلى 3 للرواتب للموظفين

Featured Replies

بتاريخ:

السلام عليكم

أسعد الله مساءكم

عندي homwork المطلوب فيه هو:

عمل cursor يستقبل رقم من المستخدم مثلا :رقم 4

ثم يقوم بطباعة او عرض أكبر 4 رواتب للموظفين


يعني مثلا: هذا الجدول
ahmad 5000

ali 4000

yasser 9000

noor 3000

ثم يستقبل رقم 2 من المستخدم فتكون النتيجة هي كالتالي:

yasser 9000

ahmad 5000


أتمنى أنكم فهمتوا المطلوب وشكرا

بتاريخ:

تقدر حضرتك تدخل بأاه سواء اكبر 4 او 2 رواتب للموظيفين

set verify off
set serveroutput on declare 
 num number(2):=&p_num;
 sal   employees.salary%type;
 cursor emp_cursor is 
 select distinct salary
 from employees order by salary desc;
begin open emp_cursor;
 loop
 fetch emp_cursor into sal; exit when emp_cursor%rowcount>num ;
 dbms_output.put_line(sal);
 end loop;
 close emp_cursor;
end;

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

@nana@ جزاك الله ألف خير وجعله في موازين حسناتك

بتاريخ:


يوجد احل اخر أخي / اختي الفاضل /الفاضلة



declare
v_count number := 1;
p_counter number := &x;
 begin
 for rec in (select ename,sal from emp
			 order by sal desc ) loop
if v_count = p_counter then
 dbms_output.put_line('Name  '||rec.ename||'  sal '||rec.sal);
  exit;
else
 v_count := v_count + 1;
 dbms_output.put_line('Name  '||rec.ename||'  sal '||rec.sal);
end if;
end loop;
 end;

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

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

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

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

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

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.