Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Support RETURNING also in the SQL language

Lukas EderMay 15 2018

The PL/SQL language has the useful RETURNING clause, which can be added to most DML statements:

DECLARE

   v_result tab.id%TYPE;

BEGIN

   INSERT INTO tab (col)

  VALUES (123)

  RETURNING id INTO v_result;

END;

/

It would be really useful if the SQL language also supported this clause, exactly like PostgreSQL and Firebird do as well:

INSERT INTO tab (col)

VALUES (123)

RETURNING id

This suggestion is one option to implement the desired feature. It would make the SQL and PL/SQL languages a bit more consistent. A much better option, of course, would be to implement the SQL standard (which is supported by DB2). In that case, the following syntax could be used:

SELECT *

FROM FINAL TABLE (

   INSERT INTO tab (col)

   VALUES (123)

)

That syntax is very powerful, as the results of several DML operations can be joined or otherwise combined (e.g. with unions). The clause is called <data change delta table> in the SQL:2016 standard, and is part of the Feature T495, “Combined data change and retrieval”

Comments

Jens Petersen
You need a valid licence, but then there are not additional charges to download from edelivery


Notice

By accessing the software on this Web site, you agree that (1) you have already obtained a license from Oracle, or an Oracle partner, for your use of the software and that your Oracle License and Services Agreement or Software License and Services Agreement, Oracle PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement with Oracle or an Oracle partner, plus the applicable ordering document with Oracle or an Oracle partner, governs your use of the software, or (2) if you have not already obtained a license from Oracle or an Oracle Partner for your use of the software, the Oracle Electronic Delivery Trial License Agreement on this Web site governs your use of the software for the time specified in such agreement. Note: Programs downloaded for trial use or downloaded as replacement media may not be used to update any unsupported programs.



http://edelivery.oracle.com/EPD/GetUserInfo/get_form
oradba
You don't need a license, when you want to download Enterprise Linux from Oracle. Other products need a valid license.

Werner
SID3
Thanks for the reply. But how do i get the license. Can i get it by just filling up the get form( the link thats presented in previious thread).

Any help?
SID3
How to obtain license from Oracle Corporation for unlimited use of products at Oracle edelivery.
Nicolas Gasparotto
How to obtain license from Oracle Corporation for unlimited use of products at Oracle edelivery.
Did you want a licence for all the Oracle products ? What for ? Do you know how many are ?

Nicolas.
oradba
Edelivery.com is a download portal for those already having a valid license. You can buy Oracle software (including licenses) in the Oracle OnlineShop:
http://oraclestore.oracle.com

Under which circumstances you are allowed to use Oracle software without a license is clearly defined under 'license conditions' on the OTN download site.

Werner
1 - 6

Post Details

Added on May 15 2018
6 comments
643 views