Quantcast
Channel: admin's blog
Viewing all articles
Browse latest Browse all 10

mysqldump of latest 1000 records

$
0
0

You can order and limit mysqldump output using the "--where" option. The --where condition below dumps the latest 1000 records from a table.

mysqldump --where="TRUE ORDER BY id DESC LIMIT 1000"

Here are some other examples.

mysqldump --where="TRUE LIMIT 500"
mysqldump --where="mailbox_id=45"
mysqldump --where="mailbox_id=45 AND TRUE ORDER BY id DESC LIMIT 300"


Viewing all articles
Browse latest Browse all 10

Trending Articles