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() ;