Home:ALL Converter>SQL Server 2005 where condition with string comparison

SQL Server 2005 where condition with string comparison

Ask Time:2010-08-06T12:32:52         Author:Anto Varghese

Json Formatter

I am using SQL Server 2005 with the following query

SELECT * 
FROM EMPLOYEE 
WHERE EMP_NAME = 'ABCD'

It gave me the proper results and when i tried the same query with 'ABCD ', then also it gave me the same result!!!

I feel it should not give any results as there is no employee with name 'ABCD '

Or "WHERE" condition works like this with String comparison?

Author:Anto Varghese,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/3421003/sql-server-2005-where-condition-with-string-comparison
yy