I need a shell script that deletes 1000 rows from a massive database until there is no more rows left
It is very simple, but i am very weak in shell scripting, and the many tutorials online offer extremely similar, but different nuances in syntax
UPDATE:
- Would it be possible to get some sample code?
- I need to delete 1000 rows at a time
- I have 120 Million rows to delete in total, and deleting them all at once will lock up the DB
you can call the mysql command line tool:
or
in statements.txt put:
although i do not understand why you only want to delete 1k at a time
a full script for
shwould look like this: