circle-info
Webinar | The Great Database Exodus: Navigating Strategic Risk in the Post-Oracle MySQL Era
Watch Nowarrow-up-right
LogoLogo
search
⌘Ctrlk
Download MariaDBContact Us
  • Home
  • MariaDB Platform
  • Server
  • MaxScale
  • Analytics
  • Galera Cluster
  • Connectors
  • Tools
  • MariaDB Cloud
  • Release Notes
  • General Resources
GitBook Assistant
GitBook Assistant
Working...Thinking...
GitBook Assistant
Good afternoon

I'm here to help you with the docs.

⌘Ctrli
AI Based on your contextquestion-circle
LogoLogo
  • serverMariaDB Server Documentation
  • rabbit-runningQuickstart Guides
  • tvServer Usage
  • gearServer Management
  • shield-halvedSecurity
  • house-blankArchitecture
  • wrenchClients & Utilities
  • chart-mixedHA & Performance
  • paperclipReference
    • SQL Structure
    • SQL Statements
      • Comment Syntax
      • Account Management
      • Administrative Statements
      • Data Definition (DDL)
      • Data Manipulation (DML)
      • Geometry Statements
      • Prepared Statements
      • Programmatic & Compound Statements
        • BEGIN END
        • CASE Statement
        • DECLARE CONDITION
        • DECLARE HANDLER
        • DECLARE TYPE
        • DECLARE Variable
        • FOR
        • GOTO
        • IF
        • ITERATE
        • Labels
        • LEAVE
        • LOOP
        • REPEAT LOOP
        • RESIGNAL
        • RETURN
        • SELECT INTO
        • SIGNAL
        • WHILE
        • Using Compound Statements Outside of Stored Programs
        • Cursors
        • Diagnostics
      • Stored Routine Statements
      • Table Statements
      • Transactions
    • SQL Functions
    • Data Types
    • Plugins
    • System Tables
    • Error Codes
    • Client/Server Protocol
    • Product Development
gitbookPowered by GitBook
block-quoteOn this pagechevron-down
  1. paperclipReferencechevron-right
  2. SQL Statements

Programmatic & Compound Statements

Explore programmatic compound statements in MariaDB Server. This section covers BEGIN...END blocks, loops, and conditional logic for writing complex stored routines and event definitions.

BEGIN ENDchevron-rightCASE Statementchevron-rightDECLARE CONDITIONchevron-rightDECLARE HANDLERchevron-rightDECLARE TYPEchevron-rightDECLARE Variablechevron-rightFORchevron-rightGOTOchevron-rightIFchevron-rightITERATEchevron-rightLabelschevron-rightLEAVEchevron-rightLOOPchevron-rightREPEAT LOOPchevron-rightRESIGNALchevron-rightRETURNchevron-rightSELECT INTOchevron-rightSIGNALchevron-rightWHILEchevron-rightUsing Compound Statements Outside of Stored Programschevron-rightCursorschevron-rightDiagnosticschevron-right
PreviousPREPARE Statementchevron-leftNextBEGIN ENDchevron-right

Last updated 7 months ago

Was this helpful?

LogoLogo

Products

  • Enterprise Platform
  • Community Server
  • Download MariaDB
  • Pricing

Support

  • Customer Login
  • Technical Support
  • Remote DBA
  • Professional Services

Resources

  • MariaDB Blog
  • Webinars
  • Customer Stories
  • MariaDB Events
  • Documentation
  • Developer Hub

Company

  • About MariaDB
  • Newsroom
  • Leadership
  • MariaDB Careers
  • Legal
  • Privacy Policy

© 2026 MariaDB. All rights reserved.

Was this helpful?