MySQL built-in functions can help us process data in the table more conveniently and simplify operations.
Mathematical functions:
Function | Description |
---|---|
Take absolute Value | |
Take the root | |
Take the modulo | |
Returns the largest integer value that is not greater than | |
Returns is not less than The smallest integer value | |
Rounding | |
Take the sine | |
Get cosine |
Description | |
---|---|
LOWER() | |
UPPER() | |
TRIM() | |
REPLACE() | |
CURDATE() | |
CURTIME() | |
YEAR() | |
MONTH() | |
DAY() | |
date_format() | |
MAX() | |
MIN() | |
SUM () | |
IFNULL | |
CASE WHEN | |
Server connection successful!
SQL statement executed successfully!Array##Example 2(
[count(*) ] => 5
)
Get the highest salary:
SQL statement executed successfully!
Array([max(salary)] => 30000.00
)
The above is the detailed content of How to use built-in functions in MySQL and PHP. For more information, please follow other related articles on the PHP Chinese website!