Search code examples
mysqlevalevaluationexecexecute

Is it possible to execute a string in MySQL?


I have to convert a MSSQL stored proc that passes a varchar that is a query:

INSERT INTO Results
  EXEC (@Expresion);

This isn't working. I'm pretty sure that EXEC and EXECUTE aren't MySQL commands, but CALL doesn't work either.

Does anyone know if it's even possible to have something like JavaScript's eval function for MySQL?


Solution

  • EXECUTE is a valid command in MySQL. MySQL reference manual