MariaDB PL/SQL Examples
Wed, 2019-12-04 21:49 —
Shinguz
Table of Contents
Before you start
SQL> SET SESSION sql_mode='ORACLE';
Infinite Loop Example
DELIMITER /
BEGIN
LOOP
SELECT 'Hello world from MariaDB anonymous PL/SQL block!';
END LOOP;
END;
/
DELIMITER ;


Comments
BEGIN NOT ATOMIC
I believe that the infinite loop example is just standard SQL. The only problem is that, in this context, BEGIN means START TRANSACTION. But you can use BEGIN NOT ATOMIC instead. A nice feature contributed by Antony Curtis.
Anonymous PL/SQL block
Is this not just a simple an Anonymous PL/SQL Block?