I know for selecting the records with ‘a’ as the second letter in a column we write the following query:-
Select * from table where column1 like '_a%';
For selecting the records with ‘a’ as the third letter in a column we write:-
Select * from table where column1 like '__a%';
Now I want select the records where the column1 contains ‘_'(underscore) as the second character.For example, I want to select the records with column1 like A_John, B_John, A_Jai and so on. What is the escape character I can use in this case. How can I do that? Please help.
Use:
for two underscore at first and
for single underscore at first and