Search code examples
mysqlcsvexport-to-csvdynamically-generated

automatic Export Data From Database to CSV File


i have to generate a CSV file of full database/table when any new row comes in table.

so is there any script using i can generate CSV file.

i use MySQL to store data in database from HTML Form.

plz help


Solution

  • Finally, I found a beautiful tutorial to export data from Database to CSV File.

    Also one answer on Stackoverflow.

    sqlcmd -S . -d DatabaseName -E -s, -W -Q "SELECT * FROM TableName" > C:\Test.csv