开发者

Mysql selecting and sorting by the bigger field

I have two fields on my table, lets say date_created and date_updated

I want to select 20 recently updated/created records

so it means i have to choose开发者_开发问答 the top dates from both fields, how do i do that?


found it!

greatest(field1,field2)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜