Mysql---10

1.子查询和嵌套查询: where id=(嵌套查询)

常用函数:
    1.ABS(-10)===10
    2.CELLING(10.2)===11
    3.floor(10.2) ===10
    4.rand() ==随机0-1
    5.sign(-10)==负数返回-1 正数返回 1
    6.char_length('fdsfadfaf')===字符串长度
    7.concat(a,b)===a+b=ab拼接字符串
    8.insert("fasf",1,2,'432')==432sf 截取1-2字符串插入432
    9.upper  lower
    10.replace
    11.substr
    12.reverse  

  

时间和日期函数:
    1.current_date() y-m-d
    2.current_time() h-m-s
    3.sysdate()  y-m-d  h-m-s
    4.year(now())
    5.month(now())
    6.day(now())
    7.hour(now())
    8.minute(now())
    9.second(now())
    10.now()
    11.localtime()

  

系统相关:
    1.system_user()
    2.user()
    3.version()

  

猜你喜欢

转载自www.cnblogs.com/chencn/p/12303534.html
今日推荐