Fungsi Update ini digunakan untuk memperbaharui 1 kolom pada tabel transaksi dan mengambil kode lain pada tabel referensi yang sudah dibuat, tentunya mempermudah untuk Update Kolom pada sebuah tabel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE sapawarga_village | |
SET sapawarga_village.district_id = ( | |
SELECT sapawarga_districts.id | |
FROM sapawarga_districts | |
WHERE sapawarga_village.district_code = sapawarga_districts.code | |
); |