Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> insert statement in a function or select statement
Oracle 8.1.7 on Solaris.
Is it possible to somehow execute an insert statement inside a function or another select statement? Here's what I need to happen:
select blah blah from blah where (insert statement here)
--insert statement can be in the "where" or "select" part, doesn't matter
or
select insert_function('some parameter') from dual where blah blah
--the insert function would insert a record
From what I read functions do not allow insert/update statements, and procedures cannot be called from a select statement (someone correct me if this is wrong).
We have a read-only application which is setup so only select statements against database are accepted. No direct non-select DML statements allowed. There is one exception though, where an insert statement has to happen. So having as my tool only select statements (functions or functions inside a package are OK) can I issue the insert statement? Received on Thu Jun 03 2004 - 15:14:05 CDT