I'm developing a code to search for people's names intelligently using the SQL SERVER LIKE operator.
In names like Souza and Sousa, use brackets [] Ex.:
select * from pessoas where nome like 'joão sou[sz]a%';
The above example returns me:
id | nome
-----------------
10 | joão souza araujo
56 | joão sousa dos santos
In the case of the Souza example it was just a substitute for the letter, but in Vitor | Victor where the letter C is optional I could not get information on how to assemble the query. This is my question.