To dump all the records from a table called "products" into the file /tmp/products.csv as a CSV file, use the following SQL query:
*Note that the directory must be writable by the MySQL database server. If it's not, you'll get an error message like this:
Also note that it will not overwrite the file if it already exists, instead showing this error message:
0 comments:
Post a Comment