Home > Database > Mysql Tutorial > body text

MySQL statistics maximum data Select Max

黄舟
Release: 2016-12-27 17:33:24
Original
2313 people have browsed it

Statistical maximum data

SELECT MAX() FROM syntax is used to count the maximum data of a field from the data table.

Syntax:

SELECT MAX(column) FROM tb_name
Copy after login

This SQL syntax is used to count the maximum value of a certain numerical type field. There cannot be multiple fields in MAX().

Example:

SELECT MAX(uid) FROM user
Copy after login

Get query results:

4
Copy after login

The above is the content of MySQL statistical maximum data Select Max. For more related content, please pay attention to the PHP Chinese website (www.php .cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!