Reputation: 17708
Is it possible in SQL (more specifically PostreSQL) to match a string against the pattern stored in the table so that when I have a DB field containing %some%
I'd be able to select its row by something like
SELECT * FROM table_name WHERE field_value LIKE 'Awesome stuff'
Thanks.
Upvotes: 5
Views: 925
Reputation: 425713
SELECT *
FROM table_name
WHERE 'Awesome stuff' LIKE field_value
Upvotes: 14