Oracle equivalent of PostgreSQL INSERT…RETURNING *;

别说谁变了你拦得住时间么 提交于 2019-12-05 05:23:23
John Doyle

It's not currently possible, especially in an old version of Oracle such as 8i. See this answer to a similar question.

Lukas Eder

I could imagine a solution involving EXECUTE IMMEDIATE, RETURNING, and REF CURSOR, but clearly it will be far from simple. I've previously found solutions such as this one, involving XML to problems where records of arbitrary type are to be used. They're quite freaky, to say the least. I guess you'll have to resort to running two separate queries... Specifically, with Oracle 8i, I'm afraid you won't even be able to profit from most of those features.

In short, I don't think there is any SQL construct as powerful as Postgres ... RETURNING clause in Oracle.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!