>>Code column seems to identify the product, I think it can be used as PK.
>
>A sales invoice might have product codes more than once.
>So code column can not be used as primary key.
So, what is the key - the invoice_no, product code + date ?
If it's not broken, fix it until it is.
My Blog