你的问题描述的不4098够明确。不太清楚你要的效果!这样。给你两种效果:
1,显示某个时间段的资料:
select * from tb where hour(col_datetime)=18 and to_days(col_datetime)=to_days(curdate())
2、按时间段排序!显示当天所有时间段资料:
select '今天'+cast(hour(col_datetime) as varchar(2))+'时释出的内容',* from tb where to_days(col_datetime)=to_days(curdate()) order紶by col_datetime。
、。