'Get two strings in a single column from a table SQL Query
Let's say I have a table People:
Name LastName Address
-----------------------------------------------------------
John Doe 99 Street. Random Address 101
John Doe2 98 Street. Random number Address 101
If want to search in the Address column something like '98 Random number' - then john doe2 row should be returned.
I tried
SELECT *
FROM People
WHERE Address LIKE %98 Random number%
but it returns nothing.
Can anyone assist me?
Solution 1:[1]
What about
SELECT * FROM People WHERE Address LIKE '%98%Random number%'
or
SELECT * FROM People WHERE Address LIKE '%98%' AND Address LIKE '%Random number%'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | erelguitars |
