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
  • 26,923
  • 21
  • 73
  • 125
Napster
  • 2,580
  • 4
  • 30
  • 52
  • 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
  • 26,923
  • 21
  • 73
  • 125
Subin Chalil
  • 3,368
  • 2
  • 22
  • 38