Skip to content
Advertisement

Is there a way to add variable value for new column in Alter Table statement?

Advertisement

Answer

First read this post about SQL Injection. Then you can use Dynamic SQL at your own risk, something like the following:

If you want the expression to change over time, read akhilesh’s function answer.

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