T-SQL - Column is NULL, or False. Which to use?

Associate
Joined
11 Jun 2009
Posts
438
Hi Guys,

Just part way through writing some t-sql and I've created a bit column 'Approved' I auto import data into this column with a NULL value for approved.

Just wondering if this is proper in this case, as my WHERE statements then have 'approved IS NULL', or should I be importing as False and coding appropriately?

It'll work either way I know, but just one of those questions that's bugging me.

Thanks in advance guys.
 
Associate
OP
Joined
11 Jun 2009
Posts
438
Thanks for all the replies guys.

I was swaying towards making everything either FALSE or TRUE and, to be honest, setting the column to non-nullable completely slipped my mind when I was posting this. That makes the most sense to me.

As I said, I just needed some justification for either method as I know it would have worked either way. Something to keep in mind for future :)
 
Back
Top Bottom