Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/09/2009, 21:02
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Select: Multiples COUNT en una BD

Código sql:
Ver original
  1. SELECT t1.conteo1,t2.conteo2,t3.conteo3 FROM
  2. (SELECT COUNT(campo1) AS conteo1 FROM tabla1) AS t1,
  3. (SELECT COUNT(campo2) AS conteo2 FROM tabla2) AS t2,
  4. (SELECT COUNT(campo3) AS conteo3 FROM tabla3 AS t3;

así es los 3 conteos en un solo registro.

saludos
__________________
Without data, You are another person with an opinion.
W. Edwads Deming