Re: problema con un procedimiento almacenado
Hola Juan Carlos,
Trata:
DELIMITER $$
DROP PROCEDURE IF EXISTS `guias`.`CiudadInsProc`$$
CREATE PROCEDURE `guias`.`CiudadInsProc`(IN CodCiudad DECIMAL(18,0), IN DesCiudad VARCHAR(1000))
BEGIN
DECLARE insert_error INT DEFAULT 0;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION /*BEGIN*/ SET insert_error = 1;
START TRANSACTION;
INSERT INTO Ciudad (CodigoCiudad, DescripcionCiudad) VALUES (CodCiudad, DesCiudad);
IF insert_error THEN
ROLLBACK;
ELSE
COMMIT;
END IF;
END$$
DELIMITER ;
Subject
Views
Written By
Posted
3488
August 14, 2007 02:32PM
Re: problema con un procedimiento almacenado
2305
August 14, 2007 03:34PM
2286
August 14, 2007 04:02PM
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.