Abdulftah Alkhraz Abdulftah Alkhraz - 3 months ago 8
SQL Question

How to insert more than one value into one column using SQL Server

I need to insert more than one value in columns

SellPrice1
,
SellPrice2
.

Because maybe one of my items has 2 or 3 sell prices.

enter image description here

Answer

You could either add an [ItemSalePrice3] column, but that could go on for ever, and you usually don't want your DB to grow horizontally instead of vertically.

I would personally add a table like:

item_id    price
_________________
1          1,50
1          2,00
2          4,00

And add an entry to that table for each price an item has.