Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/08/2014, 02:17
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

Prueba a ver si es esto lo que quieres. Con esto, creo, te traes todas las facturas de la tabla2 que tienen relacionado algún registro en la tabla 3. No lo he probado.
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 NOT NULL