0

I have a MySQL beginner question. I populated my database through the EER diagram, meaning that I created my tables on the EER diagram, and populated them with imported Excel files.

Once I'm on the server, I created the tables by using "Copy SQL to Clipboard". Since I'm not populating it manually row by row on the server, my question is how do I create a script file which lists all the statements that populated my database?

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    Possible duplicate of [How to export a mysql database using Command Prompt?](https://stackoverflow.com/questions/3031412/how-to-export-a-mysql-database-using-command-prompt) – Matt S Apr 15 '18 at 16:08

1 Answers1

0

For each table use a statement like this:

INSERT INTO tbl_name
   (firstName,lastName,Age)
VALUES
    ("John","Smith",93)

You can repeat the entries under VALUES if you wish to insert multiple rows, e.g:

VALUES
    ("Basil","Smith",42),
    ("Day","Crockett",232)
halfer
  • 19,824
  • 17
  • 99
  • 186
Aethelbald
  • 232
  • 1
  • 7