What is the difference in these two methods of determining NULL

I've got some T-SQL code that does a check to determine if a field is NULL. Normally I simply do a IS NULL check on the field, however in this code I've been given, the method used is WHERE ISNULL(MyField, '') <> ''

Is this a more accepted method? Is it better or worse than simply saying WHERE MyField IS NOT NULL

Cheers for your help


It accounts for both null fields and fields with an empty string. In some cases this is desired over just a null field.

Need Your Help

MAMP PRO PHP 5.3.5, Intl required by symfony2

php apache mamp symfony2 intl

Symfony2 is setup apart from one thing and that is "intl"

Java persistence, communications between db entities and other models

java mysql persistence toplink

I'm using the TopLink persistence library with the MySQL db in my Java applications.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.