TAILIEUCHUNG - Oracle PLSQL Language- P6

Tham khảo tài liệu 'oracle plsql language- p6', 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ả | SQL and don t expect any of the cursor attributes to be available for your cursor variables. NOTE The client-server aspect of this sharing will only really come into play when the Oracle Developer 2000 tools are converted to use PL SQL Release or above. This process shown in Figure offers dramatic new possibilities for data sharing and cursor management in PL SQL programs. Figure Referencing a cursor variable across two programs The code you write to take advantage of cursor variables is very similar to that for explicit cursors. The following example declares a cursor type called a REF CURSOR type for the company table then opens fetches from and closes the cursor DECLARE Create the cursor type. TYPE company_curtype IS REF CURSOR RETURN company ROWTYPE Declare a cursor variable of that type. company_curvar company_curtype Declare a record with same structure as cursor variable. company_rec company ROWTYPE BEGIN Please purchase PDF Split-Merge on to remove this watermark. Open the cursor variable associating with it a SQL statement. OPEN company_curvar FOR SELECT FROM company Fetch from the cursor variable. FETCH company_curvar INTO company_rec Close the cursor object associated with variable. CLOSE company_curvar END That looks an awful lot like explicit cursor operations except for the following The REF CURSOR type declaration The OPEN FOR syntax which specified the query at the time of the open While the syntax is very similar the fact that the cursor variable is a variable opens up many new opportunities in your programs. These are explored in the remainder of this section. Features of Cursor Variables Cursor variables let you Associate a cursor variable with different queries at different times in your program execution. In other words a single cursor variable can be used to fetch from different result sets. Pass a cursor variable as an argument to a procedure or function. You can in essence share the results of a cursor by .

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.