Question

 CREATE DEFINER = CURRENT_USER PROCEDURE `NewProc`(IN `pName` varchar)
BEGIN
    SELECT * from ss

END;;

when I try to save this SP using navicat to MySql Db i face syntax error problem at line number 1, when i delete the parameter, SP is saved

Was it helpful?

Solution

You have to specify the length of pName in your parameter.

Try this:

DELIMITER $$

DROP PROCEDURE IF EXISTS `NewProc`$$

CREATE DEFINER = CURRENT_USER PROCEDURE `NewProc`(IN `pName` VARCHAR(100))
BEGIN
    SELECT * FROM ss;
END$$

DELIMITER ;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top