Packages in DB2

1.4k Views Asked by At

I'm wondering if there is a package construct in DB2 like in Oracle.

For DB2 I found stored procedures and functions.

In Oracle one could group several stored procedures and functions together in a package. Is there something similar in DB2? I know one can enable some Oracle compatibility, however we should be using IBM stuff here.

I found an older article on DB2 packages however this seems to relate to a totally different concept. It seems to be more about integrating third party libraries and doing the coding outside of the database with different programming languages.

2

There are 2 best solutions below

0
On BEST ANSWER

DB2 has modules, which are equivalent to Oracle packages.

When using Oracle compatibility within DB2, the CREATE PACKAGE statement DB2 will create a module.

2
On

It appears that there are packages in DB2.

Here's a link to the IBM manual section on packages.

Here's a link to the IBM manual section on IBM's SQL procedural language, which you can use in SQL procedures.