SQL Function

Undraw Environment

SQL Function

About

A SQL Stored Function is a function that is

  • stored in the database.
  • accessible by name

A stored function may return:

  • a scalar value
  • or a result set.

Execution Example

select upper('lowercase to uppercase')
{? = call upper( ? ) }"
SELECT * FROM setoffunc()

Management

Creation

You create a stored function with a SQL DML Request that contains the SQL statements

  • CREATE FUNCTION
  • or CREATE OR REPLACE FUNCTION

Execution

You execute a SQL stored function by:

Database Support

The different way to call and use a function is database dependent.

The below table link to the documentation and to howtos. Tabulify supports by default all database SQL syntax.

Database Create Function Documentation HowTo
Postgres sql-createfunction SETOF function



Related HowTo
Undraw Environment
How to return a result set from a stored function in Postgres?

This howto shows you how to return a result set from a SQL function in Postgres. You can therefore create dynamically a SQL Query statement This example has been adapted from the official...

Task Runner