2

For example, I have a table like this:

id |      name      |
--------------------
1  | T              |
2  | Text           |
3  | A              |
4  | Text1 and Text |
5  | Txt            |

, and I want to reverse match column with string, something like this:

select * from table_name where %name% like 'Text1 and Text2 and Text3' 

, and to get these results:

id | name |
-----------
1  | T | 
2  | Text |
4  | Text1 and Text |

How is that posible?

1 Answer 1

3

Try:

SELECT *
FROM table_name
WHERE 'Text1 and Text2 and Text3' LIKE '%'||name||'%'

UPD Here is my SQLFiddle with example: SQLFiddle.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.