Keep in mind that this question interacts with your data definitions. If the "field" is defined as "Not Null", you do not need to worry about null data and select # 1 for readability. Similarly, if the field is NULL, but the IsNull function is used when executing the request:
Select IsNull(Field1, '') as Field1 From DBTable Where...
then, again, you should select # 1, because you still don't need to worry about null. Of course, this assumes that you WANT a null value that will be masked by an empty string. If you want to test null because this is an error condition, then you will have logic like this:
if (nwReader.IsDBNull(nwReader.GetOrdinal("Field1"))) *throw exception or otherwise handle null condition string aStr = (string)nwReader["field"];
This last case, however, is not a good practice. If null is an invalid value - an error condition - then you should exclude it from your DDL.
In the end, however, I always choose option # 1, because I think it leads to better readability, and it makes me make the explicit call explicit.
source share