Create a slug from a name in MySQL/MariaDB 2023-08-25 30 words - 1 min read How to create a slug from the name of an item in MySQL/MariaDB. 1 2 UPDATE my_table SET slug = LOWER(REGEXP_REPLACE(REPLACE(REPLACE(REPLACE(name, ' ', '-'), 'and', '-'), '[^a-zA-Z0-9-]', ''), '-+', '-'));