0

次の問題があります。

表 1 には次の列があります: ID、名前、色 表 2 には次の列があります: ID、価格、日付

次の 3 番目のテーブルを作成する必要があります。

  1. table2 の ID が table1 の ID にある場合は、table3 に次の行を追加します: ID、名前、価格

Table1 と Table2 はサイズが異なります。

ありがとう。

4

1 に答える 1

0
insert into table3(id, name, price) values(
 select id,name,price from table1, table2 where table1.id=table2.id)

私はあなたがそれを探していると思います

于 2012-10-30T11:43:08.287 に答える