1. OracleThe role of Package:
It can simplify application design, improve application performance, hide information, and overload subprograms.
2. Functions in ORACLE, Package, packageThe differences between bodies and procedure are the same:
Function has return values, parameters, procedure has no return values, parameters, package, packageThe body exists at the same time, just like. h and. cpp file. If you want to call it externally, declare it in the package. If you want to call it in the package, you only need to write it in the body. Package can include function, procedure
3. In sqlserver, you can directly write a stored procedure and call it. But in oracle, I have read a lot of information saying that to call a stored procedure, you must put the stored procedure into the package before it can be called? Is that true?
No. The process can also be written and called separately.
4. packagesAnd packageWhat is the difference between bodies?
Only the methods are defined in packages, and specific implementations are involved in bodies.
5. I wrote a stored procedure in the Stored Procedure procedures. Is it included in the package name? You can still write the package name directly in the package: Just write the stored procedure you want to write directly into the package?
No
6. Which package should I write? PackagesOr packageBodies
The two are integrated and must exist at the same time.
PackageBoth the body and package must be manually written.
You need to create a package (that is, the definition of the package) before creating the body. To add a package or modify the number of input parameters in a package, you must change the package and then the body.