0

I executed this query:

SELECT name FROM `product` WHERE `name` like "product%"

It returns "product 01" and "Product 02". Check here second value has capital "P" which is unwanted in result.

So how can I solve this?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Nisarg
  • 3,024
  • 5
  • 32
  • 54
  • 2
    `.. LIKE BINARY 'product%'` – amdixon Nov 24 '15 at 11:56
  • 2
    Possible duplicate of [How can I make SQL case sensitive string comparison on MySQL?](http://stackoverflow.com/questions/5629111/how-can-i-make-sql-case-sensitive-string-comparison-on-mysql) – TMichel Nov 24 '15 at 11:57

1 Answers1

1

You can try BINARY

SELECT name FROM `product` WHERE BINARY `name`  like 'product%'
Dharman
  • 30,962
  • 25
  • 85
  • 135
Subin Chalil
  • 3,531
  • 2
  • 24
  • 38