What's the difference between “LIKE” and “=” in SQL?

前端 未结 13 924
悲哀的现实
悲哀的现实 2020-12-05 12:56

Is there any difference between:

SELECT * FROM users WHERE username=\"davyjones\"

and

SELECT * FROM users WHERE username LI         


        
13条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 13:31

    Like is pattern matching operator and = is exact matching operator. i.e. where name like W% it means start with W and after that one or more characters and = i.e. where name ='James' this is exact matching

提交回复
热议问题