how can I insert the same records in two columns but different row without duplicating the two columns in the same row ?
I have two tables
structure table rek
structure table cek
table rek
rek name address
001 Jane Alaska
002 Amel Washington
003 John Virginia
table cek (I would like my output to look like the table below.)
cek rek date
01 002 12-05-2015
01 003 12-05-2015
02 002 13-05-2015
03 001 12-05-2015
how can I insert in table cek if I want output like table cek? When I trying to insert the data as shown in the above table I can't. When I removed the primary key from cek, the data was duplicated.
From your second table cek remove primary key and Fk from both the columns. and create composite primary key on column (cek,rek) in this way in your words you can record in two columns but different row without duplicating the two columns in the same row ... or else the best thing to do is to create bridging table between these two columns
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加