Skip to content
Advertisement

Find an entry in sql dependent on other entries in the table

How can I return all entries in a table that contain a string in a given column if the same string is also present in the same column with a given suffix ?

So for example, given the suffix ‘bar’, and the following table:

I want to return the the first entry, because there’s another entry (the third one) which has the same value when the suffix is appended.

Advertisement

Answer

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement