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?
Surprisingly, that’s how it works!
INF: How SQL Server Compares Strings with Trailing Spaces:
INF: Behavior of ANSI_PADDING