Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/08/2014, 13:42
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 16 años, 1 mes
Puntos: 300
Respuesta: verificar que si en una table existe un registro, al menos 1 registro exis

Código MySQL:
Ver original
  1. FROM tabla1 t1
  2.   LEFT JOIN tabla2 t2 ON t1.id = t2.factura_id
  3.   LEFT JOIN tabla3 t3 ON t1.id=t3.factura_id
  4. WHERE t2.factura_id IS NOT NULL AND t3.factura_id IS NULL