大神求解答SQL语句怎么写~~~

SQL语句:怎么查询某年中每天特定时间段的所有数据 例如:2017年每天07:00:00——19:00:00这个时间段的数据

select * from table where convert(varchar(30), time, 108) >= '07:00:00' and convert(varchar(30), time, 108) <= '19:00:00'
试试

是Oracle数据库还是什么数据库呀

是要自动运行吗??crontab

如果是Oracle数据库的话 我感觉可以先编辑一个脚本
vi test
select * from table

然后crontab -e
0 7-19 * * * >> test

test 脚本就能自动运行了。

between and