Search code examples
oracle-databasedb2packagesql-pl

Packages in DB2


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.


Solution

  • DB2 has modules, which are equivalent to Oracle packages.

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