Make MySQL dump from parts of each table I need to export some data from different tables. I tried this query

select * into outfile 'C:\Users\\User\\Desktop\\ololo.sql' from db.users where id % 2 = 1;


After this query, the SQL file was created. When I use id i in the the same query to export data from other table. Thus, an error happens. I need additional data from the other table. So, the result must be not dump of all database but part of it. Thanks for your answers.
You need to use mysqldump option --where like this:

mysqldump -uroot -p --where="id % 2 = 1" db users &gt; C:\Users\User\Desktop\ololo.sql


Give it a Try !!!