Reputation: 43
I'm not sure how to put it into words. I have this select in a ms sql table
select * from nomencl where Denumire='NGT2-65/201-32/1.3-72(DO) BMT 65 ,radial tool holder, DOOSAN'
and it returns nothing.
But if I use :
select * from nomencl where Denumire LIKE 'NGT2-65/201-32/1.3-72(DO) BMT 65 ,radial tool holder, DOOSAN%'
the record is there.
I'm not very skilled with ms sql, but I need to make it work. What could be the problem? Is it something in that string? I've searched for spaces at the end of the string but still found nothing.
Upvotes: 1
Views: 84
Reputation: 1
LIKE
is the ANSI/ISO standard operator for comparing a column value to another column value, or to a quoted string.
It returns either 1 (TRUE) or 0 (FALSE).
The equals to(=
) operator is a comparison operator and used for equality test within two numbers or expressions.
LIKE
is generally used only with strings however equals (=
) is used for exact matching and it seems faster.
Upvotes: 0