Comparing Strings in SQL Server

If you are trying to compare two strings in a stored procedure or trigger or … you need to note that you have  to specify the length of the strings before comparison, if you don’t do that, you won’t get the expected result out of your query. Also remember, it is one equal sign not two like Java.

I am not suggesting to do that, I am looking at DBs as storage for data and to me, all manipulations on data should be exercised on the logic layer of your application.

How to Compare two strings using a if in a stored procedure in sql server 2008?

Leave a Reply

Your email address will not be published. Required fields are marked *