Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15

This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.

CALL statement

Applies to ❌ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

When using CREATE PROCEDURE statements, for greater composability, it is essential to be able to call a procedure from another procedure. This is done using the CALL statement.

// Create a procedure that inserts a log message in a table
Parameter<String> message = in("message", VARCHAR);


      // ...
      call("log").args(val("My first message")),
      // ...
      call("log").args(val("My second message"))
      // ...

Dialect support

This example using jOOQ:


Translates to the following dialect specific expressions:

BigQuery, DB2, HSQLDB, Hana, MariaDB, MySQL, Postgres, YugabyteDB

CALL log('message')

Firebird, Informix

EXECUTE PROCEDURE log('message')



SQLDataWarehouse, SQLServer

EXEC log 'message'

ASE, Access, Aurora MySQL, Aurora Postgres, ClickHouse, CockroachDB, Derby, DuckDB, Exasol, H2, MemSQL, Redshift, SQLite, Snowflake, Sybase, Teradata, Trino, Vertica

Generated with jOOQ 3.20. Translate your own SQL on our website

References to this page


Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo