MySQL Forums
Forum List  »  Spanish

Re: declarar una variable dentro de un Procedure??
Posted by: Miguel Martinez
Date: November 24, 2008 12:47PM

Hola que tal Mauricio

Así debería funcionar:

BEGIN

set @vIdCliente=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

Saludos

Miguel Martinez
Celaya, Mexico



Edited 1 time(s). Last edit at 11/24/2008 12:50PM by Miguel Martinez.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: declarar una variable dentro de un Procedure??
5477
November 24, 2008 12:47PM


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.