MySQL learning footprint record 10 -- Summary Data -- MAX (), MIN (), AVG (), SUM (), COUNT () bitsCN.com
MySQL learning footprint record 10 -- Summary Data -- MAX (), MIN (), AVG (), SUM (), COUNT ()
Data used in this article
mysql> SELECT prod_
MySQL learning footprint record 10 -- Summary Data -- data used in this article, such as MAX (), MIN (), AVG (), SUM (), and COUNT ()
mysql> SELECT prod_price FROM products;+------------+| prod_price |+------------+| 5.99 || 9.99 ||
Concrete Example 1. PHP Server ComponentsFor beginners, it is recommended to use the integrated server component, which already includes PHP, Apache, Mysql and other services, eliminating the time spent by developers in the tedious configuration
Sum is the standard SUM function in an SQL statement, and the SUM function returns null if there are no records that match the criteria.But in most cases, we want it to return 0 instead of NULL if the condition record is not met, so we can use the
Title MySQL SUM () COUNT () is also in the work of the recordSUM () returns the number of columns and the total number of points such as a studentEg:select sum (obj) from table is definitely the sum of the numbers of the obj columns in the table
Sum is the standard SUM function in an SQL statement, and the SUM function returns null if there are no records that match the criteria.But in most cases, we want it to return 0 instead of NULL if the condition record is not met, so we can use the
Mysql common functions, difficulties, notes, and difficulties of mysql Functions
I. mathematical functionsABS (x) returns the absolute value of x.BIN (x) returns the binary value of x (OCT returns octal, HEX returns hexadecimal)
CEILING (x) returns
1. Export the entire database
Mysqldump-u user name-p--default-character-set=latin1 Database name > exported file name (database default encoding is latin1)
Mysqldump-u wcnc-p SMGP_APPS_WCNC > Wcnc.sql
2. Export a table
Mysqldump-u user name-P
Here are the MySQL commands that we often use and are very useful. Below you see # means execute command on UNIX command line, see Mysql> is currently logged on to MySQL server, execute MySQL command on MySQL client.Login to MySQL, if you are
MySQL tips 6-MySQL language structure-function bitsCN.com 1. mathematical functions are used to perform complex arithmetic operations. MySQL supports many mathematical functions. If an error occurs, all mathematical functions return NULL. (1)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.