Page 1 of 1

easy database table help!

Posted: Fri May 14, 2004 3:15 pm
by speedamp
i have been looking all over the place, but i need to know how to create a field in my database table that simply adds two of the other fields?

what datatype.

i tried VARCHAR
length 5
values 'field_one'+'field_two'

what is the correct syntax?

-Michael

Posted: Fri May 14, 2004 3:20 pm
by lostboy
alter table tablename add column columnname varchar(5)

update tablename set columnname = (col_1 + col_2)