Skip to content
Trino 435 Documentation logo
Trino 435 Documentation SQL routines
Type to start searching
    Trino
    Trino
    • Overview
    • Installation
    • Clients
    • Security
    • Administration
    • Query optimizer
    • Connectors
    • Functions and operators
    • SQL language
    • SQL statement syntax
    • SQL routines
      • Introduction
      • Examples
      • BEGIN
      • CASE
      • DECLARE
      • FUNCTION
      • IF
      • ITERATE
      • LEAVE
      • LOOP
      • REPEAT
      • RETURN
      • SET
      • WHILE
    • Developer guide
    • Glossary
    • Appendix
    • Release notes

    SQL routines#

    A SQL routine is a custom, user-defined function authored by a user of Trino in a client and written in SQL. More details are available in the following sections:

    • Introduction
    • Examples
    • BEGIN
    • CASE
    • DECLARE
    • FUNCTION
    • IF
    • ITERATE
    • LEAVE
    • LOOP
    • REPEAT
    • RETURN
    • SET
    • WHILE
    Previous Row pattern recognition in window structures
    Next Introduction to SQL routines