https://dev.mysql.com/doc/refman/5.7 /en/declare.html sagt:
(Hervorhebung von mir)
Wie folgt:
CREATE PROCEDURE getLast24Hours()
BEGIN
DECLARE crt_time VARCHAR(8);
DECLARE counter INT;
DECLARE currentTime DATETIME;
CREATE TABLE hours (`Hour` VARCHAR(8) NOT NULL, `Value` INT NOT NULL DEFAULT 0, PRIMARY KEY(`Hour`));