Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/12/2009, 02:12
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 2 meses
Puntos: 574
Respuesta: Consulta a 2 tablas

Código MySQL:
Ver original
  1. Select * from usuarios u
  2. where u.id not in (select p.idUser
  3.                               from prohibidos p)

Código MySQL:
Ver original
  1. from usuarios u  LEFT JOIN prohibidos p
  2.                 on u.id = p.idUser
  3. where p.idUser is null

Seguramente hay más....

Quim