Like Operator in SQL

Introduction : 
     Hi, here i will explain how to  use the like operator in SQL, Like operator is used in the situation where we don't no the exact input to the where Clause, Like can be used differently in different Cases as Show bellow



Below Query Shows the results for Username ends with 'i'
select * from LoginTable where UserName like '%i'

Below Query shows the results for username contains 'as'
select * from LoginTable where UserName like '%as%'

Below Query shows the results for username that dosen't start with 'a' to 'i'
select * from LoginTable where UserName like '[^a-i]%'

Below Query shows the results for username that start with 'a' to 'i'
select * from LoginTable where UserName like '[g-y]%'