mysql常用函数

1,USER()CURRENT_USER()DATABASE()VERSION()函数,同义函数如SESSION_USER()SYSTEM_USER()

2,取余函数mod()

mysql> select mod(29,9);
+-----------+
| mod(29,9) |
+-----------+
|         2 |
+-----------+

3,字符串函数比较受限于系统变量“max_allowed_packet”的最大值,如果超过最大值,字符串函数返回NULL。

mysql> show variables like 'max_allowed_packet';(默认16Mb)
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+

 

 

posted @ 2011-11-08 11:24  痞子过  阅读(154)  评论(0编辑  收藏  举报