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

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

    LIKE supports wildcards. Usually it uses the % or _ character for the wildcard.

    Using the LIKE operator with no wildcards is the same as using the = operator.

提交回复
热议问题