≡ Menu

SQL: Cara Delete Semua Row Kecuali 1

Untuk DELETE semua row dalam table, kecuali tinggal 1 row, run SQL query di bawah,

DELETE FROM `p_ctry` WHERE `KOD_NEGARA` != ‘MYS’

atau

DELETE FROM `xp_posts` WHERE post_status != `publish`

Terima kasih.

Other articles you might like;

0 comments… add one

Leave a Comment

Papar entri terkini dengan Commentluv <3