+ 1
Like operator
What are the possible search condtions for values of a table using LIKE operator? can anyone clarify please!
3 ответов
+ 3
There are two wild cards _ and %. _ is for single character. And % is for multiple characters.
Examples:
First character of a column:
Select * from sample where name like 'a%' ;
Last character:
Select * from sample where name like '%a%';
Name contains a:
Select * from sample where name like %'a%' ;
Two characters name:
Select * from sample where name like '__' ;
Three character name with second letter a:
Select * from sample where name like '_a_' ;
Second letter a:
Select * from sample where name like '_a%' ;
And many more depends on requirement and query.
+ 1
Ur welcome sanjaydeep ;)
0
thanks Mr.Divesh