pinker pinker - 3 years ago 153
SQL Question

Package syntax in PLSQL

I found the following code assumed to be PLSQL:

package Z
V_LOT NUMBER(17,2);
...
end Z;


However, from the oracle documentation, it seems to be that "package" statement needs to have always a "create" before the "package" word.

Is this code correct?

thanks

Answer Source

According to documentation the CREATE statement is necessary, so your code is incorrect. It has to be like this:

create package z
is
  V_LOT   NUMBER(17,2);
  ...
end z;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download