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.

Chapter 8<br />

PSQL statements<br />

PSQL – Procedural SQL – is the <strong>Firebird</strong> stored procedure and trigger language.<br />

Available in: PSQL<br />

Changed in: 1.5<br />

BEGIN ... END blocks may be empty<br />

Description: BEGIN ... END blocks may be empty in <strong>Firebird</strong> 1.5 and up, allowing you to write stub code without<br />

having to resort to dummy statements.<br />

Example:<br />

create trigger bi_atable for atable<br />

active before insert position 0<br />

as<br />

begin<br />

end<br />

Available in: PSQL<br />

Added in: 1.0<br />

Better alternative: LEAVE<br />

BREAK<br />

Description: BREAK immediately terminates a WHILE or FOR loop and continues with the first statement after<br />

the loop.<br />

Example:<br />

create procedure selphrase(num int)<br />

returns (phrase varchar(40))<br />

as<br />

begin<br />

for select Phr from Phrases into phrase do<br />

begin<br />

95

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

Saved successfully!

Ooh no, something went wrong!