Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/05/2009, 09:27
Avatar de Anubis_Slash
Anubis_Slash
 
Fecha de Ingreso: mayo-2009
Ubicación: aqui y haya
Mensajes: 173
Antigüedad: 15 años
Puntos: 5
Respuesta: Valores nulos salgan con valor 0

hola Lenin

intenta esto

SELECT t.tipo, IFNULL(Sum(p.total), 0) AS total FROM productos p RIGHT JOIN tipo t ON t.idtipo = p.idtipo GROUP BY t.idtipo;

saludos