• 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)
  • 相关阅读:
    【HDOJ5971】Wrestling Match(二分图,并查集)
    【HDOJ5978】To begin or not to begin(概率)
    【HDOJ5979】Convex(三角函数)
    【HDOJ5980】Find Small A(签到)
    【HDOJ5949】Relative atomic mass(签到)
    【HDOJ5948】Thickest Burger(签到)
    【HDOJ6228】Tree(树)
    【HDOJ6227】Rabbits(贪心)
    147.命题逻辑
    146.离散数学
  • 原文地址:https://www.cnblogs.com/zengkefu/p/5619392.html
Copyright © 2020-2023  润新知