TAILIEUCHUNG - Oracle PL/SQL by Example- P11

Tham khảo tài liệu 'oracle pl/sql by example- p11', 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ả | LAB Cursor Variables 472 a pointer to the query work area that stores the result set. You can declare a cursor variable on the client side open and fetch from it on the server side and then continue to fetch from it on the client side. Cursor variables differ from cursors in the same way that constants differ from variables. A cursor is static a cursor variable is dynamic. In PL SQL a cursor variable has a REF CURSOR datatype where REF stands for reference and CURSOR stands for the class of the object. You will now learn the syntax for declaring and using a cursor variable. To create a cursor variable first you need to define a REF CURSOR type and then you declare a variable of that type. Before you declare the REF CURSOR of a strong type you must declare a record that has the datatypes of the result set of the SELECT statement you plan to use note that this is not necessary for a weak REF CURSOR . FOR EXAMPLE TYPE inst_city_type IS RECORD first_name TYPE last_name TYPE city TYPE state TYPE Second you must declare a composite datatype for the cursor variable that is of the type REF CURSOR. The syntax is as follows TYPE ref_type_name is REF CURSOR RETURN return_type ref_type_name is a type specified in subsequent declarations. return_type is a record type for a strong cursor a weak cursor does not have a specific return type but can handle any combination of data items in a SELECT statement. The REF CURSOR keyword indicates that the new type will be a pointer to the defined type. return_type indicates the type of SELECT list that the cursor variable eventually returns. The return type must be a record type. FOR EXAMPLE TYPE inst_city_cur IS REF CURSOR RETURN inst_city_type A cursor variable can be strong restrictive or weak nonrestrictive . A strong cursor variable is a REF CURSOR type definition that specifies a return_type a weak definition does not. PL SQL enables you to associate a strong

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.