11.09.2018 Views

Aprender a desarrollar un sitio Web con PHP y MySQL

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SELECT * FROM Persona ORDER BY Nombre LIMIT 4,2<br />

Copie esta <strong>con</strong>sulta en la pestaña SQL de <strong>PHP</strong>MyAdmin y haga clic en Continuar:<br />

b. Valores distintos<br />

La instrucción que permite tomar únicamente los valores de registros distintos devueltos<br />

porSELECT es DISTINCT.<br />

Por ejemplo:<br />

SELECT DISTINCT Nombre FROM Persona ORDER BY Nombre<br />

Copie esta <strong>con</strong>sulta en la pestaña SQL de <strong>PHP</strong>MyAdmin y haga clic en Continuar:<br />

En realidad, dos personas se llaman David pero estos nombres sólo aparecen <strong>un</strong>a vez <strong>con</strong> la palabra<br />

clave DISTINCT.<br />

c. Convertir en mayúsculas<br />

La instrucción que permite <strong>con</strong>vertir el valor de <strong>un</strong> campo en mayúsculas<br />

esUPPER(nombre_del_campo).<br />

Por ejemplo, para mostrar el apellido en mayúsculas:<br />

Select Nombre, UPPER(apellidos) FROM Persona ORDER BY Nombre<br />

Copie esta <strong>con</strong>sulta en la pestaña SQL de <strong>PHP</strong>MyAdmin y haga clic en Continuar:<br />

www.FreeLibros.me

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!