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

Need Help To Make This Functions

Featured Replies

بتاريخ:

Create a package, which contains the following functions and procedures, in the HR account.


1. A function that has one input parameter of type NUMBER, and returns the square of its input.
2. A function that has three input parameters of type NUMBER, and returns the minimum of its three
inputs.
3. A function that has one input parameter of type INTEGER. The function returns TRUE if its input is a
prime number and FALSE if its input is not a prime number. A prime number (or a prime) is a natural
number that has exactly two distinct natural number divisors: 1 and itself. Here is a list of the first
twenty prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71.
4. A procedure that shows the names of employees (lastName, firstName) sorted by last name.
5. A procedure that shows the names of employees (firstName lastName) salaries less than 10000.
6. A procedure that shows the names of countries sorted by region id.
In implementing the 3rd function, you can search the web for algorithms on prime numbers. These algorithms
may be written in other programming languages. However, you will get the idea on how to
implement the function. Here is a prime testing algorithm written in Python. You may also need to get
familar with some PL/SQL data types (Figure 1). To get more information, see this PL/SQL datatypes. You
may need the MOD function in your implementation.

post-105730-1269619211_thumb.jpg

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

i work in this package a litle but i have some errors can any one correct these for me pleas

01.txt

02.txt

  • بعد 3 أسابيع...
بتاريخ:

CREATE OR REPLACE FUNCTION TEST.max_number (
p_number_a IN NUMBER,
p_number_b IN NUMBER,
p_number_c IN NUMBER
)
RETURN NUMBER
AS
v_number_a NUMBER;
v_number_b NUMBER;
v_number_c NUMBER;
v_max NUMBER;
BEGIN
v_number_a := p_number_a;
v_number_b := p_number_b;
v_number_c := p_number_c;

IF v_number_a > v_number_b AND v_number_a > v_number_c
THEN
v_max := v_number_a;
ELSIF v_number_b > v_number_a AND v_number_b > v_number_c
THEN
v_max := v_number_b;
ELSIF v_number_c > v_number_a AND v_number_c > v_number_b
THEN
v_max := v_number_c;
END IF;

RETURN v_max;
END;

بتاريخ:

CREATE OR REPLACE FUNCTION TEST.square_number (p_number IN NUMBER)
RETURN NUMBER
AS
v_number NUMBER;
BEGIN
v_number := p_number;
v_number := v_number * v_number;
RETURN v_number;
END;[يسار][/يسار]

بتاريخ:
2. A function that has three input parameters of type NUMBER, and returns the minimum of its three
inputs.

create or replace function minnum(v_a number,v_b number,v_c number)
return number
is 
begin if(v_a<v_ then
if(v_a<v_c) then 
return v_a;
elsif(v_a>v_c) then 
return v_c;
end if;
elsif(v_a>v_ then 
if(v_b<v_c) then 
return v_b;
elsif(v_b>v_c) then 
return v_c;
end if; 
end if;
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.