Subject | Re: [Firebird-Architect] Re: Indexed Views |
---|---|
Author | Alexander Klenin |
Post date | 2004-12-22T12:42:04Z |
> > R> BTW, may I fill next RFC: "Implement INSERT INTO ... VALUES ...AFAIU, we will already have this this FB 2.0:
> > R> RETURNS ..." that would also return some inserted values (useful for
> > R> INSERT statements that contain gen_id() calls).
EXECUTE BLOCK (a INTEGER, b VARCHAR(10)) RETURNS (id INTEGER) AS
BEGIN
id = gen_id(my_generator, 1);
INSERT INTO my_table (col_id, col_a, col_b) VALUES (:id, :a, :b)
END
This is, in my opinion, far more powerful and orthogonal solution.
> > ...and DEFAULTs as well. I'm with you 100% on this one.... and it even includes defaults, as in
> > More useful than the SP stuff... ;->
EXECUTE BLOCK (a INTEGER = 10, b VARCHAR(10) = 'abc')
...