default column value in sql same as other column

Solutions on MaxInterview for default column value in sql same as other column by the best coders in the world

showing results for - "default column value in sql same as other column"
Chris
19 Jun 2016
1ALTER TABLE tablename ADD newcolumn type NOT NULL DEFAULT (0)
2Go
3Update tablename SET newcolumn = oldcolumn Where newcolumn = 0
4Go
similar questions