gitdagray / csv-to-sql-insert

Provide table data as a CSV (comma-separated values) file and output a SQL insert statement for a table with the same name as the file.
MIT License
97 stars 122 forks source link

Creating the associated Table before inserting into it #26

Open itsoluwatobby opened 10 months ago

itsoluwatobby commented 10 months ago

Hello Dave! i was thinking a Table should be created before inserting into the table

And also, we could add a flag to print out a preview of the sql statement after file creation.

I already opened a pull request on this two issues provided it'll be useful.

gitdagray commented 10 months ago

Hi and thanks for the suggestion! This would not fit my use case, but others might want it. I want to keep this lightweight if possible as well. I used the output file as a statement I could quickly paste into my SQL console.

Let's leave it open for discussion here. Your idea may get some others to bump it. And thanks!! 🎉