Tag: Date () now () pattern string intercept uppercase Max Ike string--
- Character functions
- numeric operators and functions
- comparison operators and functions
- Date-time functions
- Information functions
- Aggregation functions
One, character functions
- CONCAT (): Character connection
- Concat_ws (): Character join with specified delimiter
- Format (): Numeric formatting
- LOWER (): Convert to lowercase letter
- UPPER (): Convert to uppercase
- Left (): Gets the character
- Right (): Gets the character
- Length (): Gets the string length
- LTRIM (): Remove leading spaces
- RTRIM (): Delete subsequent spaces
- SUBSTRING (): String intercept
- ' Not ' like: pattern matching
- Replace (): string substitution
mysql> SELECT CONCAT (' SUN ', ' * ', ' YUE ', ' * ', ' RU '); +----------------------------------+| CONCAT (' SUN ', ' * ', ' YUE ', ' * ', ' RU ') |+----------------------------------+| Sun*yue*ru |+----------------------------------+1 row in Set (0.00 sec)
mysql> SELECT concat_ws (' & ', ' SUN ', ' YUE ', ' RU ');
+---------------------------------+
| Concat_ws (' & ', ' SUN ', ' YUE ', ' RU ') |
+---------------------------------+
| Sun&yue&ru |
+---------------------------------+
1 row in Set (0.00 sec)
Mysql> SELECT FORMAT (1223456.78,1);
+----------------------+
| FORMAT (1223456.78,1) |
+----------------------+
| 1,223,456.8 |
+----------------------+
1 row in Set (0.00 sec)
.
.
.
Second, numeric operators and functions
- Ceil () into a rounding
- Div Integer rounding
- Floor () Rounding and rounding
- MOD take-up (modulo)
- ROUND () rounding
- TRUNCATE () Digital intercept
Third, comparison operators and functions
- [NOT] Between ... And ...
- [NOT] In ()
- is [NOT] NULL
Four, date Time function
- Now ()
- Curdate ()
- Curtime ()
- Date_add ()
- DATEDIFF ()
- Date_format ()
Http://www.w3school.com.cn/sql/sql_dates.asp
Five, information function
- CONNECTION_ID () connection ID
- Database () Current databases
- LAST_INSERT_ID () The ID number of the last inserted record
- User () Current users
- Version () Release information
Vi. Aggregation functions
- AVG ()
- COUNT ()
- MAX ()
- MIN ()
- SUM ()
MySQL built-in function learning notes