Pregunta

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 ?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top