MySQL takes the first few lines of limit usage data

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

In MySQL there is no top keyword, in MySQL can be performed using the limit function.

Order by ID desc limit 10 according to ID reverse sort out the first 10
order by id desc limit 0,10 according to the ID reverse sort out the first 10
order by id limit 5,In accordance with the 10 ID positive sorting begin to take 10 from fifth

The SQL statement:

SELECT cat_id FROM shop_goods_type order by cat_id desc limit 1
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Harry at December 13, 2013 - 6:41 PM