页次: 1
首先进入mysql
看看时间
mysql> select now(); +---------------------+ | now() | +---------------------+ | 2014-11-06 09:56:33 | +---------------------+ 1 row in set (0.00 sec)
3. 使用以下数学函数
mysql> select abs(-1); +---------+ | abs(-1) | +---------+ | 1 | +---------+ 1 row in set (0.00 sec)
4. 一个字符串函数
mysql> select ascii('a'); +------------+ | ascii('a') | +------------+ | 97 | +------------+ 1 row in set (0.00 sec)
5. ip转换函数
mysql> select inet_aton('8.8.8.8'); +----------------------+ | inet_aton('8.8.8.8') | +----------------------+ | 134744072 | +----------------------+ 1 row in set (0.00 sec) mysql> select inet_ntoa('134744072'); +------------------------+ | inet_ntoa('134744072') | +------------------------+ | 8.8.8.8 | +------------------------+ 1 row in set (0.00 sec) mysql>
6. 字符串拼接
mysql> select concat("ipbbs.", "net"); +-------------------------+ | concat("ipbbs.", "net") | +-------------------------+ | ipbbs.net | +-------------------------+ 1 row in set (0.00 sec) mysql>
mysql 函数有很多,以上只是列举了几个。
ipbbs.net
离线
这里都需要使用 select
ipbbs.net
离线
页次: 1