DELIMITER //
CREATE PROCEDURE pTest()
BEGIN
DECLARE vHour INT;
SET vHour =10;
IF vHour>40 THEN
SELECT '加班了';
END IF;
END//
DELIMITER ;
DELIMITER //
CREATE PROCEDURE pTest()
BEGIN
DECLARE vHour INT;
SET vHour =10;
IF vHour>40 THEN
SELECT '加班了';
ELSE
SELECT '没加班';
END IF;
END//
DELIMITER ;
DELIMITER $$
CREATE PROCEDURE pTest()
BEGIN
DECLARE vHour INT;
SET vHour =60;
IF vHour>70 THEN
SELECT '加班超多';
ELSEIF vHour> 50 AND vHour<=70
THEN
SELECT '加班多';
ELSEIF vHour >40 AND vHour<=50
THEN
SELECT '有加班';
ELSE
SELECT '没加班';
END IF;
END$
DELIMITER ;