|Subject||Re: Returning generated key was Re: [Firebird-Architect] Re: Indexed Views|
> From: "Ann W. Harrison"For mass insert multiple rows of keys must be returned.
> At 07:36 AM 12/23/2004, Jim Starkey wrote:
> > >
> >That's a different issue. What was proposed was an open ended INSERT
> >... RETURNING <variable>...
> What gets returned for a mass insert? Or is the RETURNING only
> allowed for a singleton insert?
The SQL command for returning multiple rows is SELECT.
Why not modify it ? E.g. allow construct like this
INSERT INTO tab ...
where SELECT clause can contain any fields from "tab" table,
only single INSERT is allowed after FROM (no JOINs etc.),
other clauses (WHERE, ORDER BY, etc) may or may not be allowed ...