sql语句--时间
1.時間的比較:時間是日期類型、字符串類型,long型,直接比較
例:
SELECT * FROM student where date1 BETWEEN '2017-09-15 09:07:17' AND '2017-09-15 09:08:19'?2.from_unixtime(long型date):將時間戳轉為時間
例:
select from_unixtime(borth) borth from student
3.unix_timestamp()獲取當前時間的時間戳
例:
select unix_timestamp() ;
轉載于:https://www.cnblogs.com/-scl/p/7524803.html
總結
- 上一篇: 梦到猫咬手指怎么破解
- 下一篇: 2017.9.15 postgresql