Alex Alex - 1 year ago 106
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

Answer Source

For MySQL:

ALTER TABLE table1 ADD field2 text;
UPDATE table1 SET field2='value';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download