Delete accross multiple table on Mysql

Posted: January 20, 2011 in IT and Programming Stuff
Tags: ,

Langsung contoh aja lah ya😀

DELETE sumber FROM t_jmn_sumber_pengembalian_asuransi sumber
	JOIN t_jmn_klaim klm
		ON klm.id_klaim = sumber.ID_KLAIM
	JOIN t_krd_pembayaran_angsuran ang
		ON ang.ID_SUMBER_PENGEMBALIAN = sumber.ID_SUMBER_PENGEMBALIAN
WHERE 1=1
AND klm.id_klaim = 1013503
AND ang.FLAG_REVERSAL = 'Y';

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s