I want to insert a row in a table from the result set view.

I have to call the function "now" in one of the columns.

How can I tell mysql workbench to not insert the value "now()" but its result ?

有帮助吗?

解决方案

Okay I've finally found the manual page mentioning that feature:

https://dev.mysql.com/doc/workbench/en/wb-sql-editor-query-panel.html

It is possible to enter a function, or other expression, into a field. Use the prefix \func to prevent MySQL Workbench from escaping quotation marks. For example, for the expression md5('fred'), MySQL Workbench normally would generate the code md5(\'fred\'). To prevent this, enter the expression as \func md5('fred') to ensure that the quoting is not escaped.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top