Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/08/2009, 16:03
chelodelsur
 
Fecha de Ingreso: abril-2008
Mensajes: 208
Antigüedad: 16 años, 1 mes
Puntos: 2
Respuesta: ayuda aclarar sintaxis create function

Ok huesos52

Muchas gracias, funciona bien, ahora si nos mucha la patudez me podrías explicar el codigo???

Código MySQL:
Ver original
  1. DELIMITER $$
  2.  
  3. USE `rrserver`$$
  4.  
  5. DROP FUNCTION IF EXISTS `hora_invierno`$$
  6.  
  7. CREATE DEFINER=`root`@`%` FUNCTION `hora_invierno`(fecha_hora DATETIME) RETURNS DATETIME
  8. *\\ hasta  aquí  no hay  dramas
  9.  
  10. DECLARE f_y_h DATETIME;      
  11. SET f_y_h = DATE_SUB(fecha_hora, INTERVAL 240 DAY_MINUTE);
  12. RETURN f_y_h;
  13. END$$
  14.  
  15. DELIMITER ;

Como siempre muchas gracias