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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Internal functions<br />

• This function fully supports text BLOBs of any length, including those with a multi-byte character<br />

set.<br />

• If string is a BLOB, the result is a BLOB. Otherwise, the result is a VARCHAR(n) with n the<br />

length of the input string.<br />

• If the length argument exceeds the string length, the input string is returned unchanged.<br />

• If the length argument is not a whole number, bankers' rounding (round-to-even) is applied, i.e.<br />

0.5 becomes 0, 1.5 becomes 2, 2.5 becomes 2, 3.5 becomes 4, etc.<br />

See also: RIGHT()<br />

Available in: DSQL, PSQL<br />

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

LN()<br />

Description: Returns the natural logarithm of the argument.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

LN (number)<br />

• An error is raised if the argument is negative or 0.<br />

See also: EXP()<br />

Important<br />

If the external function LN 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: <strong>2.1</strong><br />

Description: Returns the x-based logarithm of y.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

LOG (x, y)<br />

LOG()<br />

142

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

Saved successfully!

Ooh no, something went wrong!