LIKE
and the equality operator have different purposes, they don't do the same thing:
=
is much faster, whereas LIKE
can interpret wildcards. Use =
wherever you can and LIKE
wherever you must.
SELECT * FROM user WHERE login LIKE 'Test%';
Sample matches:
TestUser1
TestUser2
TestU
Test
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…