-3
DELIMITER $$

DROP PROCEDURE IF EXISTS `payroll`.`usp_DeleteDesignation`$$

CREATE PROCEDURE `payroll`.`usp_DeleteDesignation`
(
IN DesgID int(11)
)
    /*LANGUAGE SQL
    | [NOT] DETERMINISTIC
    | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
    | SQL SECURITY { DEFINER | INVOKER }
    | COMMENT 'string'*/
    BEGIN
DELETE from info_designation 
(
Desg_ID,
Designation,
Desg_Description,
CreatedBy,
CreatedOn,
UpdatedBy,
UpdatedOn,
DeletedFlag
)
where
Desg_ID = DesgID;

    END$$

DELIMITER ;

错误:(0 行受影响)(0 毫秒)

错误代码:1064 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 12 行的“(Desg_ID,Designation,Desg_Description,CreatedBy,CreatedOn,UpdatedBy,”附近使用正确的语法(0 ms)

4

1 回答 1

0

代替

BEGIN DELETE from info_designation 
( Desg_ID, Designation, Desg_Description, CreatedBy, 
CreatedOn, UpdatedBy, UpdatedOn, DeletedFlag ) 
where Desg_ID = DesgID;

它应该是

BEGIN DELETE from info_designation where Desg_ID = DesgID;
于 2012-12-21T10:33:30.993 回答