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

前端 未结 13 907
悲哀的现实
悲哀的现实 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:40

    Like gets you to work with wild card operators, you may use it in your case for like 'davyjon%' to get all the results starting with davyjon, and to get the exact you may place 'davyjones' and you may also use = in this case

提交回复
热议问题