Skip to content

Instantly share code, notes, and snippets.

@mknparreira
Last active August 12, 2021 22:27
Show Gist options
  • Save mknparreira/0541d17f450627f6be553fc086f98f10 to your computer and use it in GitHub Desktop.
Save mknparreira/0541d17f450627f6be553fc086f98f10 to your computer and use it in GitHub Desktop.
PostegreSQL | Just a simple REGEX

SQL REGEX

SELECT *
FROM tasks
WHERE `dependency` REGEXP 's:[0-9]+:".*33.*".*'
@mknparreira
Copy link
Author

SELECT *
FROM tasks AS T1
WHERE T1.id NOT IN (
SELECT T2.id FROM tasks AS T2 WHERE T2.dependency REGEXP 's:[0-9]+:".33.".*'
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment