Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/03/2009, 22:19
massochof
 
Fecha de Ingreso: marzo-2009
Mensajes: 1
Antigüedad: 15 años, 2 meses
Puntos: 0
Respuesta: como saber a que tabla pertenecen los registros

En una consulta


(select 'tabla1' tabla, count(*) total from tabla1 where nombre= 'juan')
UNION
(select 'tabla2' tabla, count(*) total from tabla2 where nombre = 'juan')
UNION
(select 'tabla3' tabla, count(*) total from tabla3 where nombre = 'juan')