开发者

Querying mysql table for times after the current one

I have a table with 1 column (bus departure times in format "14:32:15"). How to query the table to show only departures that are after the c开发者_StackOverflowurrent moment (after curtime())?

E.g.: if it's 12 o'clock and my table has rows (10:15:00,11:20:00,12:30:00, ...), I want to have 12:30:00 returned.


Try this SELECT time FROM yourtable WHERE time > now()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜