Michael
Michael

Reputation: 6405

mysql export table based on a specific condition

I need to export the data and structure of a table but the data must have a specific condition (WHERE status=0). I know that I can use mysqldump to export the whole table but I don't know how to make it export only "where status=0". Any advice would be appreciate

Upvotes: 2

Views: 3392

Answers (1)

Michael
Michael

Reputation: 6405

<pre>
mysqldump -t -u [username] -p mydatabase mytable --where=status=0

Upvotes: 4

Related Questions