Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Firebird Null guide.pdf
Скачиваний:
8
Добавлен:
23.08.2013
Размер:
78.64 Кб
Скачать

Firebird Null Guide

Summary

NULL in a nutshell:

NULL means unknown.

If NULL figures in an expression, most of the time the entire expression becomes NULL.

In aggregate functions only non-NULL fields are involved in the computation. Exception:

COUNT(*).

UDFs sometimes convert NULL <-> non-NULL in a seemingly random manner.

If the test expression of an if statement is NULL, the then block is skipped and the else block executed.

• To find out if A is NULL, use “A is (not) null”.

The COALESCE and *NVL functions can convert NULL to a value.

Assigning NULL is done like assigning values: with “A = NULL” or an insert list.

Remember, this is how NULL works in Firebird SQL. There may be (subtle) differences with other RDBMSes.

13

Firebird Null Guide

Appendix A:

Document history

The exact file history is recorded in the manual module in our CVS tree; see http://sourceforge.net/ cvs/?group_id=9028

Revision History

 

 

0.1

8 April 2005

PV

First edition.

0.2

15 April 2005

PV

Mentioned that Fb 2.0 legalises “A = NULL” comparisons.

 

 

 

Changed text in “Testing if something is NULL”.

 

 

 

Slightly altered “Dealing with NULLs” section.

14

Firebird Null Guide

Appendix B:

License notice

The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. Copies of the License are available at http://www.firebirdsql.org/pdfmanual/pdl.pdf (PDF) and http:// www.firebirdsql.org/manual/pdl.html (HTML).

The Original Documentation is titled Firebird Null Guide.

The Initial Writer of the Original Documentation is: Paul Vinkenoog.

Copyright (C) 2005. All Rights Reserved. Initial Writer contact: paulvink at users dot sourceforge dot net.

15