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.

See also: CEIL() / CEILING()<br />

Available in: DSQL, ESQL, PSQL<br />

Added in: IB<br />

Internal functions<br />

GEN_ID()<br />

Description: Increments a generator or sequence and returns its new value. From <strong>Firebird</strong> 2.0 onward, the SQLcompliant<br />

NEXT VALUE FOR syntax is preferred, except when an increment other than 1 is needed.<br />

Result type: BIGINT<br />

Syntax:<br />

Example:<br />

GEN_ID (generator-name, )<br />

::= An integer expression.<br />

new.rec_id = gen_id(gen_recnum, 1);<br />

Warning<br />

Unless you know very well what you are doing, using GEN_ID() with step values lower than 1 may compromise<br />

your data's integrity.<br />

See also: NEXT VALUE FOR, CREATE GENERATOR<br />

Available in: DSQL, PSQL<br />

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

GEN_UUID()<br />

Description: Returns a universally unique ID as a 16-byte character string.<br />

Result type: CHAR(16) CHARACTER SET OCTETS<br />

Syntax:<br />

GEN_UUID ()<br />

Available in: DSQL, PSQL<br />

HASH()<br />

140

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

Saved successfully!

Ooh no, something went wrong!