|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
calculated columns in a tableHi,
I have a table with fields FirstName and LastName. I also have a column FullName. Each time the table is updated, I'd like the field FullName to be calculated automatically based on the values of FirstName and LastName (FullName = FirstName + ' ' + LastName). What Default value should I enter when I design the table ? Thanks create table test1 ( firstnm varchar(10),
lastname varchar(10), fullname as firstnm + ' ' + lastname ) insert into test1 (firstnm,lastname) values ('Omni','buzz') select * from test1 -Omni Thanks. that answers my question :)
Omnibuzz wrote: Show quote > create table test1 ( firstnm varchar(10), > lastname varchar(10), > fullname as firstnm + ' ' + lastname > ) > > > insert into test1 (firstnm,lastname) values ('Omni','buzz') > > select * from test1 > > -Omni |
|||||||||||||||||||||||