Código SQL:
Ver original
CREATE OR REPLACE PROCEDURE CitaConcurrente ( idDeMascota IN NUMBER, F1 IN DATE ) AS espera NUMBER; BEGIN loop SELECT COUNT(*) INTO espera FROM bd_mascota_proy.inicio; IF espera>0 THEN exit; END IF; END loop; EXEC Programarcitas(idDeMascota, F1); commit; END; /