1-- MySQL
2
3-- example
4DELIMITER $$ -- Changes delimiter to $$ so can use ; within the procedure
5CREATE PROCEDURE select_employees()
6BEGIN
7 select *
8 from employees
9 limit 1000; -- Use the ; symbol within the procedure
10END$$
11DELIMITER ; -- Resets the delimiter
12
13/* syntax:
14DELIMITER $$ -- Changes delimiter to $$ so can use ; within the procedure
15CREATE PROCEDURE <Your-procedure-name>(<argument1><argument2>...<argumentN>)
16BEGIN
17 <Code-that-stored-procedure-executes>; -- Use the ; symbol within the procedure
18END$$
19DELIMITER ; -- Resets the delimiter
20*/
1DELIMITER //
2
3CREATE PROCEDURE GetAllProducts()
4BEGIN
5 SELECT * FROM products;
6END //
7
8DELIMITER ;Code language: SQL (Structured Query Language) (sql)