Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/05/2010, 09:56
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 3 meses
Puntos: 360
Respuesta: Consulta campo varchar

Código MySQL:
Ver original
  1. mysql> select *from texto;
  2. +---------+
  3. | campo   |
  4. +---------+
  5. | daniel  |
  6. | daniela |
  7. | 4521369 |
  8. | 45899   |
  9. +---------+
  10. 4 rows in set (0.00 sec)
  11.  
  12. mysql> select *from texto where campo REGEXP ('^[0-9]+$') ;
  13. +---------+
  14. | campo   |
  15. +---------+
  16. | 4521369 |
  17. | 45899   |
  18. +---------+
  19. 2 rows in set (0.03 sec)

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