What are the differences between oracle functions and stored procedures? 1. the difference between return values. A function has one return value, while a stored procedure returns multiple or no 2 values through a parameter. the difference between calling. A function can be called directly in a query statement, and a stored procedure must be called independently. A function is generally used to calculate and return a computing result, while a stored procedure is generally used to perform specific data operations (such as modifying, inserting a database table, or executing some DDL statements) if multiple parameter values are returned, it is best to use the stored procedure. If only one return value is returned, you can use the function. From the call situation, if the SQL statement (DML or SELECT) the stored function or the stored encapsulated function cannot be a stored procedure, but there are many restrictions and the purity level of the function when calling the stored function. if it is called in a procedural statement, it depends on what features you want to implement. A function is generally used to calculate and return a computing result, while a stored procedure is generally used to perform specific data operations (such as modifying, inserting a database table, or executing some DDL statements ), so although their syntax is very similar, the functions that users need to complete when using them are mostly different. The biggest difference between an oracle function and a stored procedure is that a function must carry a return value, followed by a type of return value, while a stored procedure can have no return value. In addition, stored procedures and functions also support the in, out, and in out parameters, which indicate the input parameters, output parameters, and input and output parameters respectively. That is to say, if we need to return multiple values, in addition to using stored procedures, we can also use functions to implement them by returning one of them, you can specify the data as the out parameter. In Oracle, stored procedures and functions can return values, but functions must return values. Generally, only one value is returned. stored procedures do not have this restriction. From the general application perspective, if no return value or multiple return values are required, the stored procedure is used. If only one return value is used, the function is used. From the programmer's habits, this is more in line with thinking. In addition, it is best to name stored procedures with proc _ headers, while functions with func _ headers and variables with v _ headers. The code can be indented to enhance readability and aesthetics!