![]() ![]() The function must have at least one RETURNstatement in the execution section. It means the function reads the value from an IN OUT parameter, change its value and return it back to the calling program. An IN OUT parameter is read and write parameter.An OUTparameter is initialized to a default value of its type when the function begins regardless of its original value before being passed to the function. The OUTparameters are used to return values back to the calling program. An OUTparameter is a write-only parameter.You can pass a constant, literal, initialized variable, or expression to the function as the INparameter. If the function tries to change the value of the INparameters, the compiler will issue an error message. An IN parameter is a read-only parameter.Each parameter has one of three modes: IN, OUT and IN OUT. You must specify the data type of each parameter explicitly in the data_type. You specify the parameter names in the parameter_1, parameter_2, etc. By convention, the function name should start with a verb, for example convert_to_number.Ī function may have zero or more than one parameter. You specify the function name function_nameafter the FUNCTIONkeyword. Let’s examine the syntax of creating a function in greater detail: Code language: SQL (Structured Query Language) ( sql ) RETURN return_data_type IS -the declaration statements BEGIN - the executable statements return return_data_type ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |