Hi,
I am writing a MySQL script. I used a parameter file to set a user variable
set @log_file = "C:/logs/table_creation.txt";
I used the variable in another file in the tee command as follows
set @log = concat("tee ", @log_file);
prepare stmt from @log;
execute stmt;
But it throws the following error.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tee C:/logs/table_creation.txt' at line 1
ERROR 1243 (HY000): Unknown prepared statement handler (stmnt) given to EXECUTE
I used to set variables in Oracle and use it for the entire session. I am trying to do a similar thing in MySQL. Could someone help me please.
Thanks
Shiny