Articulos PHP

Articulos Jquery

Articulos CSS

Articulos Mysql


Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 199

Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 220

Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 220

2.0 Seleccionar filas con las expresiones <,>, <= y >= junto con WHERE.

Para seleccionar registros o filas que tengan determinadas columnas cuyos valores sean <,>,<= o >= a otro valor, debemos usar WHERE junto con las expresiones anteriores. Supongamos que tenemos una tabla llamada usuarios y queremos ver todos los nombres de usuarios, es decir, la columna nick, donde la edad sea menor a 18, la consulta queda como sigue:
SELECT Nick FROM usuarios WHERE edad<18
Y si quisieramos los nombres de usuario de quienes la edad sea menor o igual a 18:
SELECT Nick FROM usuarios WHERE edad<=18
que la edad fuera mayor a 18:
SELECT Nick FROM usuarios WHERE edad>18
que la edad sea mayor igual a 18:
SELECT Nick FROM usuarios WHERE edad>=18
que la edad sea mayor igual a 18 y menor igual a 25:
SELECT Nick FROM usuarios WHERE edad>=18 AND edad<=25
y por ultimo que la edad sea mayor a 18 o menor a 25:
SELECT Nick FROM usuarios WHERE edad>18 OR edad<25


Warning: Use of undefined constant tema - assumed 'tema' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 225
Expresiones <,>,<= y >=.

Warning: Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP) in /home/vhosts/lawebderay.orgfree.com/articulos.php on line 225
2

Copyright © 2013 LaWebDeRay
correo:lawebderay@gmail.com

Free Web Hosting