Today I learned the wording of Oracle's package and then encountered a problem. Both the package declaration and the package body are correct, but the error is executed: Object Omgmig.test_package is invalid.
This is an error SQL, it looks normal, right? But it's an error.
--Package DeclarationCreatePackage Omgmig.test_package asprocedureShow1;EndOmgmig.test_package;--Package BodyCreatePackage Body Omgmig.test_package asprocedureShow1 isbegin forIinch 1..9Loopdbms_output.put_line ('The value of I is:'||i);EndLoop;End;EndOmgmig.test_package;beginOmgmig.test_package.show1;End;
Then right-click on the package name to view, PL/SQL prompts for the cause of the error:
But I was in the definition when the OMGMIG prefix is added, and then drop the package, the name of the OMGMIG prefix is removed after the execution succeeds. Because I am currently using the account is Omgmig,pl/sql will automatically remove this prefix. Additionally, the reason for the error is that the package name cannot contain "."
An error was executed after Oracle created the package: Object Omgmig.test_package is invalid.