Search code examples
mysqlsqldatagrip

Executing sql strings from csv into mysql database


I've created a huge .csv with only one column, each column is a valid sql string update like:

UPDATE TBL SET LAST = 0 WHERE ID = 1534781;

Is there a way to execute each row as a single sql query? Also, I'm using datagrip, if anyone knows of a sort of tool I would be happy.


Solution

  • To execute a file against your database in DataGrip just use the context menu when observing your file in Files tool window

    enter image description here