Hi all,
According to normal way, we design the table with fields. Example with an article the table can contain fields as follows: title, content, author.....
But how does everybody think if we add up some fields to a field?
Hi all,
According to normal way, we design the table with fields. Example with an article the table can contain fields as follows: title, content, author.....
But how does everybody think if we add up some fields to a field?
Holding multiple values in a column is a bad idea. It breaks 1st Normal form.
I think you mean:
MyTable
-------
int FieldA
int FieldB
int FieldSum
Where FieldSum
is a calculated field, defined as the sum of FieldA
and FieldB
.
Is that correct?
Or do you mean changing this:
MyTable
-------
char LicensePlate
char Make
char Model
to this:
MyTable
-------
char LicensePlate
char MakeAndModel
In that case: why?
Your question is a bit confusing but if you are trying to hold multiple values in a field Mitch is right. If you REALLY have to do it you could use an XML column.
Here is a link to XML Support information for SQL Server 2005.