Re: Is there any way to check for a field with nothing in it?

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Fri, 29 Jul 2016 11:15:06 -0400
Message-ID: <nnfrte$sgn$1_at_jstuckle.eternal-september.org>


On 7/29/2016 10:25 AM, bit-naughty_at_hotmail.com wrote:
> If I insert a new line, and put nothing into a particular field, what is its value? Is that what NULL is? (like, there's simply 0 bytes allocated for its space?)
>
> How does one check for a NULL field, or ALL NULL fields in a particular line in a table?
>
>
> Thanks.
>

No, NULL is the lack of a value. Most databases internally use some type of flag to indicate a field is NULL.

If, when inserting a row (not a LINE) you don't put anything in that field, it will revert to the default value for that column. If there is no default value you will get an error.

To check for a null field, you use

  <column-name> IS NULL.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Fri Jul 29 2016 - 17:15:06 CEST

Original text of this message