I
I
Igorek19992020-08-10 19:39:43
SQL
Igorek1999, 2020-08-10 19:39:43

How to make a query to search for a word in a string?

Tell me how to make a query in SQL to search in a string?
For example, there is a column namewith entries

FootBall Adidas 20
FootBall Nike Sm
BasketBall Adidas Red
PinkBall Adidas RT


How do I enter the word in the search adidas, get in response all the columns where the name contains the word adidasand it doesn’t matter if there are capital letters there or not.
Just driving in basketballto get the result of 2 columns.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-08-10
@Igorek1999

SELECT LOWER(название_столбца)
FROM название_таблицы 
WHERE название_столбца
LIKE '%слово%'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question