21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Syntax:<br />

MINVALUE (expr [, expr ...])<br />

Internal functions<br />

• If one or more expressions resolve to NULL, MINVALUE returns NULL. This behaviour differs<br />

from the aggregate function MIN.<br />

See also: MAXVALUE()<br />

Available in: DSQL, PSQL<br />

Added in: <strong>2.1</strong><br />

MOD()<br />

Description: Returns the remainder of an integer division.<br />

Result type: INTEGER or BIGINT<br />

Syntax:<br />

MOD (a, b)<br />

• Non-integer arguments are rounded before the division takes place. So, “7.5 mod 2.5” gives 2 (8<br />

mod 3), not 0.<br />

Important<br />

If the external function MOD is declared in your database, it will override the internal function. To make the<br />

internal function available, DROP or ALTER the external function (UDF).<br />

Available in: DSQL, PSQL<br />

Added in: 1.5<br />

NULLIF()<br />

Description: NULLIF returns the value of the first argument, unless it is equal to the second. In that case, NULL<br />

is returned.<br />

Result type: Depends on input.<br />

Syntax:<br />

Example:<br />

NULLIF (, )<br />

select avg( nullif(Weight, -1) ) from FatPeople<br />

146

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!