how to search for exact string in mysql


Problem :

I'm trying to search for an exact match of a string in mysql. The string is 'nrew'. But when I do the queries below, I still get a result:

SELECT UserID FROM sys_users WHERE UserID='NREW'
SELECT UserID FROM sys_users WHERE UserID='NrEw'

Please help.



Solution :

SELECT UserID FROM sys_users WHERE BINARY UserID='NREW'

Mysql Tutorials

Mysql Howto..

How to sort through data in xml to export into MySQL server?

How to connect remote database in asp.net using mysql?

How to undo the group effect of having clause in MySQL?

MySQL => Postgres migration: How do I script the sequence start values?

how to escape a string in php? [duplicate]

How could a query fail to insert data into mysql that is retreived from WEB?

MySQL: How to search from two fields?

How can I access the MySQL command line with xampp?

How to trace MySql queries using MySql-Proxy?

How do I set a full date & time sql using java, and not just the date?

How can I visualise a histogram of timestamps (stored in MySQL) without having to code much?

how to create xml files via php and Mysql [duplicate]

How to install socket.io and mysql on Node.js

How to loop through a table in MySQL?

How to select a row through a pivot table

How do I link a MySQL table's columns to columns is other tables?

MySQL: how to pivot unknown name-value pairs?

How to add items to shopping basket JSP

How to match and sort by similarity in MySQL?

How to tie up MySQL tables properly

How to get Age using BirthDate column by MySQL query?

How do I restrict certain values in column 2 with the same value in column 1 in SQL?

How to Reset MySQL database with time limit using php

How to recover data from a table, and store that into list?

Mysql SET NAMES UTF8 - how to get rid of?

How to return mysql data using table aliases with left join and duplicate columns

How to determine which driver to use for JDBC

how to count the particular string in row wise in mysql table

How to make execution update reverse query mysql by id?

How to sort month in calendar order using mysql query