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? 回答1: EXECUTE is a valid command in MySQL. MySQL reference manual 回答2: I think you're looking for something like this: SET @queryString = ( SELECT CONCAT('INSERT INTO user