MySQL

From wiki.adammorgan.org
Jump to: navigation, search

MySQL Workbench

  • The MySQL Query Browser is end-of-life, and was replaced by the workbench.

Programming Info

  • Procedures vs Functions [1]
    • A procedure is invoked using a CALL statement and can only pass back values using output variables.
    • A function can be called from inside a statement just like any other function and can return a scalar value.
    • A stored routine is either a procedure or a function.

Procedures

Example

DELIMITER //
 
CREATE PROCEDURE `p2` ()
LANGUAGE SQL
DETERMINISTIC
SQL SECURITY DEFINER
COMMENT 'A procedure'
BEGIN
    SELECT 'Hello World !';
END//