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

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

    The LIKE condition allows you to use wildcards:

    SELECT * FROM suppliers
    WHERE supplier_name like 'Hew%';
    

    See more examples.

    and Equals = is used for equality matching.

提交回复
热议问题