select * from users as u inner join user_extra as e on u.id = e.user_id where u.id in () into outfile '/tmp/info1025.csv' fields terminated by ',' enclosed by '"' lines terminated by '\n'\G;