Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/01/2011, 15:00
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: Simple y sencillo Select

Código MySQL:
Ver original
  1. mysql> select *from clientes;
  2. +------+----------+----------+
  3. | id   | nombre   | depto    |
  4. +------+----------+----------+
  5. |    1 | DANIEL   | SISTEMAS |
  6. |    2 | MONICA   | BIOLOGIA |
  7. |    3 | SANTIAGO | SISTEMAS |
  8. +------+----------+----------+
  9. 3 rows in set (0.11 sec)
  10.  
  11. mysql> set @nombre='DANIEL';
  12. Query OK, 0 rows affected (0.02 sec)
  13.  
  14. mysql> SELECT *FROM clientes WHERE nombre=@nombre;
  15. +------+--------+----------+
  16. | id   | nombre | depto    |
  17. +------+--------+----------+
  18. |    1 | DANIEL | SISTEMAS |
  19. +------+--------+----------+
  20. 1 row in set (0.00 sec)
__________________
Without data, You are another person with an opinion.
W. Edwads Deming