sql查询每天整点的数据

2020-06-24
-- sqlserver
-- date_time数据类型为datetime
select * from `table1` where RIGHT(CONVERT(varchar(19),data_time,120),5)='00:00'

 
-- mysql
-- date_time数据类型为datetime
select * from `table1` where RIGHT(data_time,5)='00:00'

原文链接:https://blog.csdn.net/guofang110/article/details/90210628

{/if}