Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Wednesday, June 16, 2021

Select Where exist in table 2

 SELECT * FROM tb_barang_temp WHERE kode_barcode IN (SELECT DISTINCT kode_barcode FROM tb_barang)

Wednesday, January 20, 2021

UPDATE TABLE 1 WHERE ID=TABLE 2

 UPDATE `tb_barang_temp` AS t1

    JOIN `tb_type` AS t2 

    ON t1.type=t2.type

SET t1.`type`=t2.id