Skip to content
Advertisement

How to add a column in MSSQL with default value?

In MSSQL 2014 I would like to use an update syntax which is adding a new column with a default value. Is this possible somehow?

Advertisement

Answer

Here is a complete reproducible example.

Create table

Check contents

Add new column with default value

Check the result

Here is a SQL fiddle with this example.

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