TAILIEUCHUNG - Oracle PLSQL Language- P2

Tham khảo tài liệu 'oracle plsql language- p2', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | TYPE name_rectype IS RECORD prefix VARCHAR2 15 first_name VARCHAR2 30 middle_name VARCHAR2 30 sur_name VARCHAR2 30 suffix VARCHAR2 10 RECORD TYPE employee_rectype IS NUMBER 10 NOT NULL NUMBER 10 TYPE VARCHAR2 20 empname_rectype DATE SYSDATE BOOLEAN emp_id mgr_id dept_no title name hire_date fresh out -- Declare a variable of this type. new_emp_rec employee_rectype BEGIN Referencing Fields of Records Individual fields are referenced via dot notation For example Individual fields within a record can be read from or written to. They can appear on either the left or right side of the assignment operator BEGIN insurance_start_date 30 FALSE Record Assignment An entire record can be assigned to another record of the same type but one record cannot be compared to another record via Boolean operators. This is a valid assignment Please purchase PDF Split-Merge on to remove this watermark. shipto_address_rec customer_address_rec This is not a valid comparison IF shipto_address_rec customer_address_rec THEN . END IF The individual fields of the records need to be compared instead. Values can be assigned to records or to the fields within a record in four different ways The assignment operator can be used to assign a value to a field SYSDATE You can SELECT INTO a whole record or the individual fields SELECT emp_id dept title hire_date college_recruit INTO new_emp_rec FROM emp WHERE surname LI You can FETCH INTO a whole record or the individual fields FETCH emp_cur INTO new_emp_rec FETCH emp_cur INTO You can assign all of the fields of one record variable to another record variable of the same type IF rehire THEN new_emp_rec former_emp_rec ENDIF This aggregate assignment technique works only for records declared with the same TYPE statement. Nested Records Nested records are records .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.