mysql其他函数




mysql> select if(2>1,100,0);
+---------------+
| if(2>1,100,0) |
+---------------+
| 100 |
+---------------+
1 row in set (0.22 sec) mysql> select ifnull(null,100);
+------------------+
| ifnull(null,100) |
+------------------+
| 100 |
+------------------+
1 row in set (0.00 sec) mysql> select ifnull(55,100);
+----------------+
| ifnull(55,100) |
+----------------+
| 55 |
+----------------+
1 row in set (0.00 sec) mysql> select convert(now(),date);
+---------------------+
| convert(now(),date) |
+---------------------+
| 2016-06-26 |
+---------------------+
1 row in set (0.00 sec) mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2016-06-26 19:16:33 |
+---------------------+
1 row in set (0.00 sec) mysql> select convert(now(),time);
+---------------------+
| convert(now(),time) |
+---------------------+
| 19:16:51 |
+---------------------+
1 row in set (0.00 sec) mysql> select md5("12313");
+----------------------------------+
| md5("12313") |
+----------------------------------+
| f7e0ef389ac6133c88aedbd66b44a4e1 |
+----------------------------------+
1 row in set (0.00 sec) mysql> select md5(12313);
+----------------------------------+
| md5(12313) |
+----------------------------------+
| f7e0ef389ac6133c88aedbd66b44a4e1 |
+----------------------------------+
1 row in set (0.00 sec) mysql> select md5("this");
+----------------------------------+
| md5("this") |
+----------------------------------+
| 9e925e9341b490bfd3b4c4ca3b0c1ef2 |
+----------------------------------+
1 row in set (0.00 sec) mysql> select md5("汉");
+----------------------------------+
| md5("汉") |
+----------------------------------+
| cadf00a8be6f12fa9791909eeed002d5 |
+----------------------------------+
1 row in set (0.00 sec)
上一篇:Excel坐标自动在AutoCad绘图_5


下一篇:django时区设置以及全球用户如何各自显示当地时间