Answers for "sql create new column with default value of another column"

SQL
3

add column table sql default value

ALTER TABLE users
ADD visit_number INT DEFAULT 0;
Posted by: Guest on May-16-2020
0

default column value in sql same as other column

ALTER TABLE tablename ADD newcolumn type NOT NULL DEFAULT (0)
Go
Update tablename SET newcolumn = oldcolumn Where newcolumn = 0
Go
Posted by: Guest on December-11-2020

Code answers related to "sql create new column with default value of another column"

Code answers related to "SQL"

Browse Popular Code Answers by Language