TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 171

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 171', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Cursors in PL SQL Every SQL statement executed by the RDBMS has a private SQL area that contains information about the SQL statement and the set of data returned. In PL SQL a cursor is a name assigned to a specific private SQL area for a specific SQL statement. There can be either static cursors whose SQL statement is determined at compile time or dynamic cursors whose SQL statement is determined at runtime. Static cursors are used only for DML statements SELECT INSERT UPDATE DELETE MERGE or SELECT FOR UPDATE . These static cursors can be explicitly declared and named or may appear in-line as an implicit cursor. Dynamic cursors are used for any type of valid SQL statement including DDL CREATE TRUNCATE ALTER and DCL GRANT REVOKE . Dynamic cursors are implemented with the EXECUTE IMMEDIATE statement. Explicit Cursors Explicit cursors are SELECT statements that are DECLAREd explicitly in the declaration section of the current block or in a package specification. Use OPEN FETCH and CLOSE in the execution or exception sections of your programs. Declaring explicit cursors To use an explicit cursor you must first declare it in the declaration section of a block or package. There are three types of explicit cursor declarations A cursor without parameters for example CURSOR company_cur IS SELECT company_id FROM company A cursor that accepts arguments through a parameter list for example CURSOR company_cur id_in IN NUMBER IS SELECT name FROM company WHERE company_id id_in A cursor header that contains a RETURN clause in place of the SELECT statement for example CURSOR company_cur id_in IN NUMBER RETURN company ROWTYPE This last example shows that the cursor can be declared separately from its implementation for example the header in a package specification and the implementation in the package body. See Section for more information. Opening explicit cursors To open a cursor use the following syntax OPEN cursor_name argument argument . where .

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.