بتاريخ: 6 أكتوبر 200817 سنة comment_140184 عايز اعرف اية الفرق بين ال record and row لان فية فى البى ال متغير من نوع recordومتغير من نوع %row typeومش عارف افرق بينهم ارجو المساعدة؟ تم تعديل 6 أكتوبر 200817 سنة بواسطة mohooo81 تقديم بلاغ
بتاريخ: 7 أكتوبر 200817 سنة comment_140237 مرحباالفرق بسيط و هو انه في حالة الـ record انت بتعرف الحقول,اما في الـ rowtype بيتعرف على الحقول لحاله.مثال: DECLARE dept_info departments%ROWTYPE; BEGIN -- department_id, department_name, and location_id are the table columns -- The record picks up these names from the %ROWTYPE dept_info.department_id := 300; dept_info.department_name := 'Personnel'; dept_info.location_id := 1700; -- Using the %ROWTYPE means we can leave out the column list -- (department_id, department_name, and location_id) from the INSERT statement INSERT INTO departments VALUES dept_info; END; DECLARE TYPE EmpRec IS RECORD (last_name employees.last_name%TYPE, salary employees.salary%TYPE); emp_info EmpRec; emp_id NUMBER := 100; BEGIN UPDATE employees SET salary = salary * 1.1 WHERE employee_id = emp_id RETURNING last_name, salary INTO emp_info; DBMS_OUTPUT.PUT_LINE('Just gave a raise to ' || emp_info.last_name || ', who now makes ' || emp_info.salary); ROLLBACK; END; للمزيد تقديم بلاغ
بتاريخ: 8 أكتوبر 200817 سنة كاتب الموضوع comment_140296 شكرا ليك يا مان على الشرح مع الامثلة...... تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.