Posted by NC on 09/21/05 23:56
google@charliefortune.com wrote:
>
> > > My 'products' table has an auto-incrementing id for each record,
> > > other fields, and a 'merchant' field.
>
> > In other words, you decided not to use merchant's product numbering
> > system? Is this wise?
>
> do I not run the risk of having duplicate numbers as product_id ?
> It is a primary key.
My point exactly: why do you need an auto-incrementing primary key?
In your case, it is probably a better idea to have a primary key
composed of merchant ID and merchant-assigned product ID.
> Is there a way of using the value of one field in a table to generate
> the contents of another field in a seperate table ? Like in Excel ?
Yes. It's called joining:
http://dev.mysql.com/doc/mysql/en/join.html
Cheers,
NC
[Back to original message]
|