drop procedure if exists paymenttype_save$$
create PROCEDURE paymenttype_save(
IN pId INT,
IN pName varchar(50),
IN pUpdatedId INT,
IN pUpdatedDate Date
)
BEGIN
IF pId<1 THEN
insert into paymenttype
(
Name,
UpdatedId,
UpdatedDate
)
values
(
pName,
pUpdatedId,
pUpdatedDate
);
ELSE
update paymenttype
set Name=pName,
UpdateId=pUpdateId,
UpdateDate=pUpdateDate
where Id=pId;
END IF;
END$$
DELIMITER ;
No comments:
Post a Comment