Home > database >  Create a stored procedure to realize the research and development department employees salary plus 1
Create a stored procedure to realize the research and development department employees salary plus 1

Time:05-22

Delimiter $$
CREATE PROCEDURE liujiahao (bumen in char (6), the OUT res float (8, 2))
The BEGIN

SELECT ` INTO res ` income FROM salary where ` department staff name `=bumen;
IF bumen=r&d
THEN the SET res=+ res 1000;
END IF;
END $$
  • Related