Is it possible to use an sql script variable defined externally?
eg. I have the following script:
UPDATE mytable SET valid = 0 WHERE valid = 1
which I have to execute through the mysql command line several times, each with a different table name.
I would like something like:
SET table_name=foo mysql -uuser -ppassword < myscript.sql
Is it possible?
source share