-1

table1value= の列とid_monthvalue =の列があり、6 から 12 に更新する必要があります。value= のすべての行を選択し、to を変更して計算 + 新しい値を作成するには、この変更の効果が必要です。の新しい日付で更新します。1months6table2id_months1months12date_startmonthsdate_end

table1 がそのように

id_month | months
1        | 6
2        | 12

table2 はそのように

id | id_month | months | date_start  | date_end
1  | 1        | 6      | 2016-01-01  | 2016-07-01
2  | 1        | 6      | 2016-03-01  | 2016-09-01
3  | 1        | 6      | 2016-06-01  | 2016-12-01
4  | 1        | 6      | 2016-08-01  | 2017-02-01

ありがとうございました。

4

1 に答える 1