DELIMITER $$
DROP PROCEDURE IF EXISTS `Spesa`.`Insert`$$
CREATE PROCEDURE `Spesa`.`Insert` (amount FLOAT,date DATE,subject INT,spendtype INT)
BEGIN
INSERT INTO Spese( ammonto,data )
VALUES ( amount,date ) ;
SET @N = LAST_INSERT_ID( ) ;
INSERT INTO Rel_Spese_Soggetto( ID_Spesa, ID_soggetto )
VALUES (@N , subject);
INSERT INTO Rel_Spese_TipodiSpesa( ID_Spesa, ID_tipo_spesa )
VALUES (@N , spendtype)
END$$
DELIMITER ;
What's the problem???
It gives the error: You have an error in your SQL syntax. (errno: 1064)