25.10.2013 Views

New SQL Features in Firebird

New SQL Features in Firebird

New SQL Features in Firebird

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.

32<br />

Common <strong>SQL</strong> : MERGE<br />

DELETE substatement and multiply WHEN clauses<br />

MERGE INTO TABLE<br />

USING LOG<br />

ON TABLE.PK = LOG.PK<br />

WHEN MATCHED AND LOG.ACTION = 'D' THEN<br />

DELETE<br />

WHEN MATCHED THEN -- second WHEN MATCHED clause<br />

UPDATE SET col1 = LOG.val1, ...<br />

WHEN NOT MATCHED THEN<br />

INSERT (col1, ...) VALUES (LOG.val1, ...)<br />

Luxembourg 2011 Whats new <strong>in</strong> <strong>Firebird</strong> <strong>SQL</strong>

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

Saved successfully!

Ooh no, something went wrong!