Skip to content
Advertisement

Use a variable or function in MYSQLs ALTER TABLE statement

In Mysql/MariaDB I like to set the comment of an existing column to a string containing the current date.

But I only get SQL syntax errors. I’ve tried so far:

Also not working:

Of course this works:

Is this possible without an external script?

Advertisement

Answer

demo

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement