Home > database >  Function of executing DML statements
Function of executing DML statements

Time:09-29

In the function to perform DML statements, need autonomous transactions, after performing the DML statements to commit at the same time, but I now is to insert data in the temporary table, data will be cleared after a commit, how to deal with this situation

CodePudding user response:

Avoid this kind of practice, think about the other way,

CodePudding user response:

Don't use function, in the process of bai inside,

CodePudding user response:

refer to the second floor jdsnhan response:
don't use function, in the process.


I also want to return a result set

CodePudding user response:

Now I add a layer of function in the outside, inside child function called
 
WITH C AS
(SELECT *
FROM the TABLE (son_function ()))
SELECT a T1. * FROM T1, C (SELECT COUNT (1) ALL_COUNT FROM C) T2

Write a (SELECT COUNT (1) ALL_COUNT FROM C such autonomous transaction even if it's not commit an error the
Don't know the reason
  • Related