Monday, March 12, 2012

Generated sprocs of VS2005

Can someone explain the generated sprocs of VS2005 if one column can be nullable

DependentOfSeqID = @.Original_DependentOfSeqID OR ((@.IsNull_DependentOfSeqID = 1) AND (DependentOfSeqID IS NULL))

In VS2003 the generated sprocs would be

DependentOfSeqID = @.Original_DependentOfSeqID OR ((@.Original_DependentOfSeqID IS NULL) AND (DependentOfSeqID IS NULL))

Which is the best?

I guess the 2 statements are the same: the first 1 uses a variable @.IsNull_DependentOfSeqID to determine whther the @.Original_DependentOfSeqID is null; while the 2nd directly compare it to null.

No comments:

Post a Comment