PL/SQL User's Guide and Reference 10g Release phần 5

Tham khảo tài liệu 'pl/sql user's guide and reference 10g release phần 5', 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ả | Overloading Subprogram Names Table 8-1 Cont. Parameter Modes IN OUT IN OUT Passes values to a subprogram Returns values to the caller Passes initial values to a subprogram and returns updated values to the caller Formal parameter acts like a constant Formal parameter acts like an uninitialized variable Formal parameter acts like an initialized variable Formal parameter cannot be assigned a value Formal parameter must be assigned a value Formal parameter should be assigned a value Actual parameter can be a constant initialized variable literal or expression Actual parameter must be a variable Actual parameter must be a variable Actual parameter is passed by reference a pointer to the value is passed in Actual parameter is passed by value a copy of the value is passed out unless NOCOPY is specified Actual parameter is passed by value a copy of the value is passed in and out unless NOCOPY is specified Using Default Values for Subprogram Parameters By initializing IN parameters to default values you can pass different numbers of actual parameters to a subprogram accepting the default values for any parameters you omit. You can also add new formal parameters without having to change every call to the subprogram. Example 8-6 Procedure with Default Parameter Values PROCEDURE create_dept new_dname VARCHAR2 DEFAULT TEMP new_loc VARCHAR2 DEFAULT TEMP IS BEGIN NULL END If a parameter is omitted the default value of its corresponding formal parameter is used. Consider the following calls to create_dept create_dept -- Same as create_dept TEMP TEMP create_dept SALES -- Same as create_dept SALES TEMP create_dept SALES NY You cannot skip a formal parameter by leaving out its actual parameter. To omit the first parameter and specify the second use named notation create_dept new_loc NEW YORK You cannot assign a null to an uninitialized formal parameter by leaving out its actual parameter. You must pass the null explicitly or you can specify a default value of NULL in the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
12    362    1    26-06-2024
Đã 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.