Updated on 2025-09-19 GMT+08:00

Overview

What Is a DWS Stored Procedure?

In DWS, business rules and logics are saved as stored procedures.

A stored procedure is a combination of SQL, PL/SQL, and Java statements. Stored procedures can move the code that executes business rules from applications to databases. In this way, code can be used by multiple programs at a time.

For details about how to create and call a stored procedure, see CREATE PROCEDURE.

The functions created using the PL/pgSQL language mentioned in DWS PL/pgSQL Functions are similar to the application methods of stored procedures. Unless otherwise specified, the following sections apply to stored procedures and PL/pgSQL functions.

DWS Stored Procedure Data Types

A data type refers to a value set and an operation set defined on the value set. A DWS database consists of tables, each of which is defined by its own columns. Each column corresponds to a data type. DWS uses corresponding functions to perform operations on data based on data types. For example, DWS can perform addition, subtraction, multiplication, and division operations on data of numeric values.