Add a column with a default value to a table

SQL Server

 

Famous database from Microsoft. Skyvia requires the server to be available from Internet.

Add a column, with a default value, to an existing table in SQL Server

Query Text

ALTER TABLE {TABLENAME} 
  ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL} 
  CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE}
  [WITH VALUES]
  

Open Query