Subject | Re: [Firebird-Architect] for discussion Transient Data Set |
---|---|
Author | Ann W. Harrison |
Post date | 2005-01-11T16:02:54Z |
Dmitry Yemanov wrote:
INSERT INTO <table>... YIELDING [<col list> AS] <tds_name>
where the <col list> is list of names that match a subset of the column
names in <table>. If no <col list> is specified, columns for
<tds_name> would have the same name and datatypes as the columns in
<table>, including columns not listed in the insert. If <col list> is
specified, columns in the temporary data set will have the same data
type as the column in <table> that has the same name.
DELETE FROM <table> ...
YIELDING [<col list> AS] <tds_name>
with the same rules for columns as above.
UPDATE <table> ...
YIELDING OLD [<col list> AS] <tds_name1>
NEW [<col list> AS] <tds_name2>
with the same rules for columns and the phrase requiring at least one of
OLD or NEW.
Regards,
Ann
> "Jim Starkey" <jas@...> wrote:How about adding three more ways to create transient data sets:
>
>>I would like to see the mechanism broadened so a mass insert can return
>>a transient data set of what actually got stored.
>
>
> Did you think of something like:
>
> INSERT ... RETURNING <col_list> AS <tds_name>
INSERT INTO <table>... YIELDING [<col list> AS] <tds_name>
where the <col list> is list of names that match a subset of the column
names in <table>. If no <col list> is specified, columns for
<tds_name> would have the same name and datatypes as the columns in
<table>, including columns not listed in the insert. If <col list> is
specified, columns in the temporary data set will have the same data
type as the column in <table> that has the same name.
DELETE FROM <table> ...
YIELDING [<col list> AS] <tds_name>
with the same rules for columns as above.
UPDATE <table> ...
YIELDING OLD [<col list> AS] <tds_name1>
NEW [<col list> AS] <tds_name2>
with the same rules for columns and the phrase requiring at least one of
OLD or NEW.
Regards,
Ann