+ 1

Like operator

What are the possible search condtions for values of a table using LIKE operator? can anyone clarify please!

20th Jan 2017, 1:12 PM
Sanjaydeep G
Sanjaydeep G - avatar
3 Answers
+ 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.
20th Jan 2017, 1:22 PM
Divesh Agarwal
Divesh Agarwal - avatar
+ 1
Ur welcome sanjaydeep ;)
20th Jan 2017, 1:45 PM
Divesh Agarwal
Divesh Agarwal - avatar
0
thanks Mr.Divesh
20th Jan 2017, 1:27 PM
Sanjaydeep G
Sanjaydeep G - avatar