简体   繁体   中英

i want to create a transfer table with multiple row in a single primary key

i have one table i want to use one primary key in many row and not stop inputting row until i finished which is one transmittal_id equals to many rows of data

example table:transfer

(pk)transmittal_id (fk)product_id product_name product_quantity

i want a result table like this

example result table:transfer

transmittal_id product_id product_name product_quantity
220526 APCEE 100
220524 LAGUNDI 100
1 220529 TOVIT 100
220601 BETTER C 100
220605 ZINC VITA 100

If TRANSMITTAL_ID column is a PK for the TRANSFER table therefore this one cannot contain NULL values. Transmittal_id column must contain unique values for every row of the table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM