select * from tb where substring(time,':',1)>='7:30' order by id limit 2;
详细说明 SELECT * FROM `qbb` WHERE TIMEDIFF(st,'7:30')>0 OR HOUR(TIME(st))=HOUR(TIME('7:30'))orSELECT * FROM `qbb` WHERE HOUR(TIME(st))>=HOUR(TIME('7:30'))
select * from table1 a where (`TIME`<now() and not exists (select 1 from table1 where `TIME`<now() and `TIME`>a.`TIME`)) or (`TIME`>now() and not exists (select 1 from table1 where `TIME`>now() and `TIME`<a.`TIME`))
from tb
where substring(time,':',1)>='7:30'
order by id
limit 2;
SELECT * FROM `qbb`
WHERE TIMEDIFF(st,'7:30')>0 OR HOUR(TIME(st))=HOUR(TIME('7:30'))orSELECT * FROM `qbb`
WHERE HOUR(TIME(st))>=HOUR(TIME('7:30'))
from table1 a
where (`TIME`<now() and not exists (select 1 from table1 where `TIME`<now() and `TIME`>a.`TIME`))
or (`TIME`>now() and not exists (select 1 from table1 where `TIME`>now() and `TIME`<a.`TIME`))