What problem does it solve? REPLACE in MariaDB is widely misunderstood as an upsert, but it actually deletes the conflicting row and inserts a new one, causing silent data loss, burned AUTO_INCREMENT ids, and unexpected trigger and cascade behavior. This Skill prevents those bugs when writing, generating, or reviewing REPLACE statements. ## Core Features & Use Cases - Delete-then-insert semantics: Explains why REPLACE resets unlisted columns to DEFAULT, generates new AUTO_INCREMENT values, and fires DELETE plus INSERT triggers and ON DELETE cascades. - Upsert contrast: Shows when to use INSERT … ON DUPLICATE KEY UPDATE instead of REPLACE for true insert-or-update behavior. - Full syntax coverage: Documents the VALUES, SET, and SELECT forms, PARTITION targeting, REPLACE … RETURNING, and the INSERT+DELETE privilege requirement. - Use Case: When asked to write an upsert for a users table, the Skill steers you to ON DUPLICATE KEY UPDATE so existing columns and ids are preserved instead of silently wiped. ## Quick Start Ask the AI to write or review a MariaDB REPLACE statement for your table and confirm whether an upsert with ON DUPLICATE KEY UPDATE is the safer choice.