How to take the dump of Mysql table by select query
Sometimes we need to take the dump of selected data from Mysql table. We can use the following syntax to achieve the above requirement.
mysql -e "select * from table" -u user -ppassword database > database.sql
Where,
table is the mysql table name.
user is the mysql username.
password is the mysql user password.
database is the mysql database name.
We can use any select query by this way to dump data from table.