P
P
Pista2022-04-16 19:57:05
MySQL
Pista, 2022-04-16 19:57:05

How to compose a .sh command to clear data from a table in one query?

Individually in the console, I execute the commands
mysql
use table_Name
DELETE FROM clicks;

How to automate this process?
Unfortunately, this is not possible: in one line?
mysql -u root table_Name DELETE FROM clicks;

Need SH script as I understand it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question