Alex Alex - 1 month ago 6x
SQL Question

Extending tables in SQL

How to add a column to the table:

create table table1 (id integer primary key, field1 text)

? The column would be
field2 text
and the value for existing rows in this column should be


For MySQL:

ALTER TABLE table1 ADD field2 text;
UPDATE table1 SET field2='value';