Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/08/2009, 17:31
Avatar de FiruzzZ
FiruzzZ
 
Fecha de Ingreso: diciembre-2007
Ubicación: en casa
Mensajes: 470
Antigüedad: 16 años, 4 meses
Puntos: 41
Respuesta: triggers funciones ( como crear una y usarla )

algo así es mi idea.. pero aún no me sale (N)

CREATE FUNCTION actu_stock(IN insumo text, IN cantidad integer) RETURNS void AS
BEGIN
UPDATE insumos
SET insumos.stock = insumos.stock + cantidad
WHERE insumos.codinsumo = insumo
END;