The SQL-92 standard makes a distinction between empty string and NULL. It is Oracle that considers empty string and NULL to be equivalent. My impression is that Sybase and old versions of SQL Server behave the same way.
Re^2: Writing It Myself, DWIM, and Expectations
Replies are listed 'Best First'.
I can't check it at this moment, but I don't think any recent MS SQL (that is 7.0 and up) does this for varchars. I'm sure I would notice. It does change an empty string to a string containing the right number of spaces for char(N) columns, but there it can't do anything better. If I still remember this node tomorrow when I am at work and can try things I'll test it and post an update.
That is the very reason for varchar. And the curious behavior of SQL-92 is because there is no varchar in SQL-92.
So you must define your database with char(x) fields and you get the behavior of char(x). Of course.