Created
December 1, 2020 18:22
-
-
Save RodrigoDornelles/aae1882bc29ca67bb521196a2181a51d to your computer and use it in GitHub Desktop.
simple slugfy sql command with regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE page SET slug = regexp_replace(title, '[^a-z]+', '-', 'g'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment