Reputation: 646
I want to use LIKE
query to select some specific word just like UU1
.
I use
SELECT UniID FROM MasterCustomer where (UniID like '%uu1%' )
But it also returns a row which contains UU11
.
How can I modify my query to select only UU1
?
My table contains values like
UU1-UU7-UU5
UU2-UU1
UU3-UU1
UU31-UU14
Upvotes: 3
Views: 10671
Reputation: 11813
try this:
SELECT UniID
FROM MasterCustomer
WHERE (UniID like '%uu1' ) OR (UniID like '%uu1-%' )
Upvotes: 3