MySQL Forums
Forum List  »  Spanish

Re: declarar una variable dentro de un Procedure??
Posted by: Jorge Medrano
Date: December 03, 2008 02:24PM

BEGIN

DECLARE vIdCliente INT DEFAULT 0;

IF pTipoConsulta = 1 THEN
SELECT MAX(idCliente) into vIdCliente
FROM Cliente;

INSERT INTO correos(email, identidad, descripcion, entidad)
VALUES(pEmail, vIdCliente, pDescripcion, pentidad);
END IF;

END

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: declarar una variable dentro de un Procedure??
3407
December 03, 2008 02:24PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.