What problem does it solve? Writing INSERT statements for MariaDB with generic SQL knowledge leads to missed features and subtle bugs: agents reach for REPLACE instead of a true upsert, misread affected-row counts, misuse LAST_INSERT_ID() after multi-row inserts, or expect INSERT IGNORE to fail silently. This Skill documents the exact delta between standard SQL INSERT and MariaDB's implementation so generated or reviewed statements are correct. ## Core Features & Use Cases - RETURNING extension: Return inserted rows, expressions, and stored-function results in a single round trip instead of a follow-up SELECT. - True upsert guidance: Use INSERT … ON DUPLICATE KEY UPDATE with VALUE()/VALUES() instead of REPLACE, preserving unmentioned columns and AUTO_INCREMENT values. - Trap catalog: Covers INSERT IGNORE warning and error-coercion behavior, DELAYED/priority engine limits, PARTITION targeting, the SET form, and INSERT … SELECT same-table restrictions. - Use Case: When asked to write an upsert for an inventory table, produce INSERT INTO inventory (sku, qty) VALUES ('A1', 5) ON DUPLICATE KEY UPDATE qty = qty + VALUE(qty) rather than a destructive REPLACE. ## Quick Start Write a MariaDB INSERT statement that upserts inventory quantities and returns the affected row ids in one statement.