Sign inTry Free
  • Introduction
    • Deploy
      • Connect to Your Cluster
        • Create a Database
          • Integrate with SingleStoreDB
          • Load Data
            • Query Data
              • Manage Data
                • Developer Resources
                  • User and Cluster Administration
                    • Reference
                      • Configuration Reference
                        • SingleStoreDB Operator Reference
                          • SingleStore Tools Reference
                            • SQL Reference
                              • SQL Command Syntax
                              • SQL Commands List
                              • SQL Functions List
                              • Comparison Operators and Functions
                                • Database Object Case-Sensitivity
                                • Data Types
                                  • Character Encoding
                                    • Operations that Take Either a Database or a Cluster Level Lock
                                      • User-Defined Variables
                                        • Restricted Keywords
                                          • Aggregate Functions
                                            • Cluster Management Commands
                                              • Code Generation Functions
                                                • Conditional Functions
                                                  • Data Definition Language DDL
                                                    • Data Manipulation Language DML
                                                      • Date and Time Functions
                                                        • Distinct Count Estimation Functions
                                                          • Full-Text Search Functions
                                                            • Geospatial Functions
                                                              • Identifier Generation Functions
                                                                • Information Functions
                                                                  • JSON Functions
                                                                    • Numeric Functions
                                                                      • Operational Commands
                                                                        • Pipelines Commands
                                                                          • Procedural SQL Reference
                                                                            • Anonymous Code Blocks
                                                                            • Control Flow Statements
                                                                            • Exceptions and Exception Handling
                                                                            • MySQL Client Delimiters
                                                                            • Transactions in Stored Procedures
                                                                            • CREATE AGGREGATE
                                                                            • CREATE [OR REPLACE] EXTERNAL FUNCTION
                                                                            • CREATE FUNCTION (UDF)
                                                                            • CREATE FUNCTION (TVF)
                                                                            • CREATE PROCEDURE
                                                                            • CREATE [OR REPLACE] TEMPORARY PROCEDURE …
                                                                            • DROP FUNCTION
                                                                            • DROP PROCEDURE
                                                                            • DROP AGGREGATE
                                                                            • SHOW AGGREGATES
                                                                            • SHOW CREATE FUNCTION
                                                                            • SHOW CREATE AGGREGATE
                                                                            • SHOW FUNCTIONS
                                                                            • SHOW PROCEDURES
                                                                            • ARRAY
                                                                            • CALL
                                                                            • CREATE_ARRAY
                                                                            • COLLECT
                                                                            • ECHO
                                                                            • ECHO SELECT
                                                                            • EXECUTE IMMEDIATE
                                                                            • INSERT_ALL
                                                                            • RECORD
                                                                            • ROW
                                                                            • QUERY
                                                                            • SCALAR
                                                                            • TO_QUERY
                                                                          • Regular Expression Functions
                                                                            • Resource Pool Commands
                                                                              • Security Management Commands
                                                                                • SHOW Commands
                                                                                  • String Functions
                                                                                    • Time Series Functions
                                                                                      • Vector Functions
                                                                                        • Window Functions
                                                                                        • Troubleshooting Reference
                                                                                          • System Databases
                                                                                          • Information Schema Reference
                                                                                            • Data API
                                                                                              • Code Engine - Powered by Wasm
                                                                                              • Security
                                                                                                • Release Notes
                                                                                                  • Support
                                                                                                    • Glossary
                                                                                                    1. Self-Managed v8.0
                                                                                                    2. /
                                                                                                    3. ...
                                                                                                    4. /
                                                                                                    5. Procedural SQL Reference

                                                                                                    Procedural SQL Reference

                                                                                                    This section contains topics about SingleStore Procedural SQL (PSQL), which encompasses stored procedures, user-defined scalar-value functions (UDFs), user-defined table-valued functions (TVFs), and user-defined aggregate functions (UDAFs).

                                                                                                    In this section

                                                                                                    • Anonymous Code Blocks
                                                                                                    • Control Flow Statements
                                                                                                    • Exceptions and Exception Handling
                                                                                                    • MySQL Client Delimiters
                                                                                                    • Transactions in Stored Procedures
                                                                                                    • CREATE AGGREGATE
                                                                                                    • CREATE [OR REPLACE] EXTERNAL FUNCTION
                                                                                                    • CREATE FUNCTION (UDF)
                                                                                                    • CREATE FUNCTION (TVF)
                                                                                                    • CREATE PROCEDURE
                                                                                                    • CREATE [OR REPLACE] TEMPORARY PROCEDURE …
                                                                                                    • DROP FUNCTION
                                                                                                    • DROP PROCEDURE
                                                                                                    • DROP AGGREGATE
                                                                                                    • SHOW AGGREGATES
                                                                                                    • SHOW CREATE FUNCTION
                                                                                                    • SHOW CREATE AGGREGATE
                                                                                                    • SHOW FUNCTIONS
                                                                                                    • SHOW PROCEDURES
                                                                                                    • ARRAY
                                                                                                    • CALL
                                                                                                    • CREATE_ARRAY
                                                                                                    • COLLECT
                                                                                                    • ECHO
                                                                                                    • ECHO SELECT
                                                                                                    • EXECUTE IMMEDIATE
                                                                                                    • INSERT_ALL
                                                                                                    • RECORD
                                                                                                    • ROW
                                                                                                    • QUERY
                                                                                                    • SCALAR
                                                                                                    • TO_QUERY

                                                                                                    Last modified: June 5, 2023

                                                                                                    Was this article helpful?

                                                                                                    TEST PIPELINE
                                                                                                    Anonymous Code Blocks

                                                                                                    Product

                                                                                                    • Product Overview
                                                                                                    • Solutions
                                                                                                    • Pricing
                                                                                                    • Support

                                                                                                    Community

                                                                                                    • Forums
                                                                                                    • Developer Hub
                                                                                                    • Events
                                                                                                    • Training

                                                                                                    Company

                                                                                                    • Contact Us
                                                                                                    • Blog
                                                                                                    • Careers
                                                                                                    • SingleStore Connect

                                                                                                    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

                                                                                                    • © SingleStore
                                                                                                    • |

                                                                                                    • Privacy Policy
                                                                                                    • |

                                                                                                    • Terms of Service
                                                                                                    • |

                                                                                                    • Legal Terms and Conditions

                                                                                                    Was this article helpful?