.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>shsql: null</title>
<body bgcolor=99cc99 vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td align=right><a href="shsql_home.html">
<img src="img/shsql.gif" border=0><br><small>SQL database system</a> &nbsp; </td></tr>
<td>
.>>

.TH null TDH "18-MAR-2004   TDH scg@jax.org" 

.SH NULL handling
In \fBshsql\fR statements and results, \fCNULL\fR represents a field that 
is empty, blank, or has no value.

.ig >>
<br><br><br>
.>>

.SH NULL in SQL statements

.LP
\fCNULL\fR may be specified in upper or lower case.

.LP 
In 
.ig >>
<a href="whereclause.html">
.>>
\0where clauses,
.ig >>
</a>
.>>
it may appear on the right-hand side of equality comparisons
using any of the constructs shown below:
.IP
\fCX = null\fR 
.ig >>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
.>>
\fCX is null\fR
.IP
\fCX != null\fR 
.ig >>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
.>>
\fCX isnot null\fR  
.ig >>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
.>>
\fCX <> null\fR
.LP
\fCNULL\fR may also appear as a member of a list
for operations such as \fCIN\fR:
.IP
\fCX in "A,B,C,null"\fR

.ig >>
<br><br><br>
.>>

.SH NULL in result rows 
.LP
.ig >>
<a href="shsql.1.html">
.>>
\0shsql(1)
.ig >>
</a>
.>>
represents \fCNULL\fR fields as \fCnull\fR by default.
When using the
.ig >>
<a href="api.html">
.>>
\0API,
.ig >>
</a>
.>>
\fCNULL\fR fields are represented in returned result rows using the internal code 
discussed below, which is equals-sign (=) by default.  The calling program can convert
these fields as desired.

.ig >>
<br><br><br>
.>>

.SH Internal representation of NULL
.LP
In data files \fCNULL\fR is stored using a certain code.
By default this code is a single equals sign (\fC=\fR), but this can be set in your
.ig >>
<a href="config.html#dbnull">
.>>
\0project config file
.ig >>
</a>
.>>
to be any symbol up to 4 characters in length.
Your \fCNULL\fR symbol should not cooincide with something that could 
occur as a meaningful non-null field in your data.
.LP
A data record containing
three null fields, using the default null symbol, would look like this in the data table file:
.IP
\fC28 Phoenix = = =\fR


.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="shsql_home.html">
<img src="img/shsql.gif" border=0></a><br>
<a href="Copyright.html">Copyright Steve Grubb</a> &nbsp;
</td></tr>
</table>
.>>
