是否可以在 MySQL 中执行字符串?

2021-11-20 00:00:00 eval exec mysql evaluation execute

我必须转换一个通过 varchar 作为查询的 MSSQL 存储过程:

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

INSERT INTO Results
  EXEC (@Expresion);

这不起作用.我很确定 EXECEXECUTE 不是 MySQL 命令,但 CALL 也不起作用.

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

有谁知道是否有可能为 MySQL 提供类似 JavaScript 的 eval 函数?

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

推荐答案

EXECUTE 是 MySQL 中的有效命令.MySQL 参考手册

EXECUTE is a valid command in MySQL. MySQL reference manual

相关文章