So I understand you have a varchar field and need to find in it, any name that contains a certain value, you can use the like
plus %
command.
The LIKE
operator is used in a WHERE
clause to search for a specified pattern in a column. Example:
SELECT column1, column2, ...
FROM table_name
WHERE columnN LIKE pattern;
Another possibility to be explored is the use of the _
operator. This defining any character, for example:
WHERE CustomerName LIKE '_r%'
You will search for any word with r in the second position. It can be used in several ways so you can see more here .
Having said all these concepts, the way to solve your problem would be select
with like
simple:
select * from TABELA where CAMPO LIKE '%maria%'