久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      MySQL 日期加減函數(shù)匯總

      MySQL 日期加減函數(shù)匯總

      1. addtime()  

      為日期加上指定秒數(shù)

      select addtime(now(),1); -- 加1秒

      2. adddate()  

      有兩種用法,第二個(gè)參數(shù)直接填數(shù)字的話是為日期加上指定天數(shù),填interval的話是為日期加上指定的interval時(shí)間

      select adddate(now(),1); -- 加1天 select adddate(now(), interval 1 day); -- 加1天 select adddate(now(), interval 1 hour); --加1小時(shí) select adddate(now(), interval 1 minute); -- 加1分鐘 select adddate(now(), interval 1 second); -- 加1秒 select adddate(now(), interval 1 microsecond); -- 加1毫秒 select adddate(now(), interval 1 week); -- 加1周 select adddate(now(), interval 1 month); -- 加1月 select adddate(now(), interval 1 quarter); -- 加1季 select adddate(now(), interval 1 year); -- 加1年

      3. date_add()  

      為日期增加一個(gè)時(shí)間間隔,這個(gè)只能使用interval時(shí)間作為參數(shù),用法和adddate()一致

      select date_add(now(), interval 1 day); -- 加1天 select date_add(now(), interval 1 hour); -- 加1小時(shí) select date_add(now(), interval 1 minute); -- 加1分鐘 select date_add(now(), interval 1 second); -- 加1秒 select date_add(now(), interval 1 microsecond); -- 加1毫秒 select date_add(now(), interval 1 week); -- 加1周 select date_add(now(), interval 1 month); -- 加1月 select date_add(now(), interval 1 quarter); -- 加1季 select date_add(now(), interval 1 year); -- 加1年

      4. subtime()  

      為日期減去指定秒數(shù)

      select subtime(now(), 1); -- 減1秒

      5. subdate()  

      與adddate()函數(shù)用法一致,有兩種用法,第二個(gè)參數(shù)直接填數(shù)字的話是為日期減去指定天數(shù),填interval的話是為日期減去指定的interval時(shí)間

      select subdate(now(),1); -- 減1天 select subdate(now(), interval 1 day); -- 減1天 select subdate(now(), interval 1 hour); --減1小時(shí) select subdate(now(), interval 1 minute); -- 減1分鐘 select subdate(now(), interval 1 second); -- 減1秒 select subdate(now(), interval 1 microsecond); -- 減1毫秒 select subdate(now(), interval 1 week); -- 減1周 select subdate(now(), interval 1 month); -- 減1月 select subdate(now(), interval 1 quarter); -- 減1季 select subdate(now(), interval 1 year); -- 減1年

      6. date_sub()   

      與date_add()函數(shù)用法一致,為日期減去一個(gè)時(shí)間間隔,這個(gè)只能使用interval時(shí)間作為參數(shù)

      select date_sub(now(), interval 1 day); -- 減1天 select date_sub(now(), interval 1 hour); --減1小時(shí) select date_sub(now(), interval 1 minute); -- 減1分鐘 select date_sub(now(), interval 1 second); -- 減1秒 select date_sub(now(), interval 1 microsecond); -- 減1毫秒 select date_sub(now(), interval 1 week); -- 減1周 select date_sub(now(), interval 1 month); -- 減1月 select date_sub(now(), interval 1 quarter); -- 減1季 select date_sub(now(), interval 1 year); -- 減1年

      推薦:《mysql教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號