TAILIEUCHUNG - Oracle PL/SQL Language Pocket Reference- P13

Oracle PL/SQL Language Pocket Reference- P13: This pocket guide features quick-reference information to help you use Oracle's PL/SQL language. It includes coverage of PL/SQL features in the newest version of Oracle, Oracle8i. It is a companion to Steven Feuerstein and Bill Pribyl's bestselling Oracle PL/SQL Programming. Updated for Oracle8, that large volume (nearly 1,000 pages) fills a huge gap in the Oracle market, providing developers with a single, comprehensive guide to building applications with PL/SQL and building them the right way. . | Nonsequential Use of PL SQL Table Of course the idea of using a minimum and maximum row assumes that the rows in the table are used sequentially. That is you fill row one then row two etc. This is a perfectly reasonable way to fill a table s rows to do this you absolutely must know the value of the row last filled. You are not however required to fill rows in this way. You can place a value in any row of the table you wish regardless of the primary key value of the last row you filled. The following example illustrates filling a PL SQL table s rows randomly rather than sequentially DECLARE TYPE countdown_tests_tabtype IS TABLE OF VARCHAR2 20 INDEX BY BINARY_INTEGER countdown_test_list countdown_tests_tabtype BEGIN countdown_test_list 1 All systems go countdown_test_list 43 Internal pressure countdown_test_list 255 Engine inflow END In this situation the minimum and maximum values do not have much significance. The ability to randomly place values in a table can come in very handy when the primary key value for the table s row is actually not sequentially derived but is instead based on data in your application. This use of intelligent primary key values is explored in more detail in Section Data-Smart Row Numbers in PL SQL Tables later in this chapter. Passing PL SQL Tables as Parameters You can also pass a PL SQL table as a parameter in a procedure or function with this approach you can in a single call pass all the values in a table into the module. In the following package specification I define two modules that pass PL SQL tables as parameters. The send_promos procedure sends a promotional mailing to all the companies in my table. The companies_overdue function returns a table filled with the names of companies that have overdue bills. PACKAGE company_pkg IS TYPE primary_keys_tabtype IS TABLE OF company. company_id TYPE NOT NULL INDEX BY BINARY_INTEGER company_keys_tab primary_keys_tabtype emp_keys_tab primary_keys_tabtype Please purchase .

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.