Comments on: Oracle 11g – Virtual Columns – to publish derived column values without storing them. And more… https://technology.amis.nl/2007/10/04/oracle-11g-virtual-columns-to-publish-derived-column-values-without-storing-them-and-more/ Friends of Oracle and Java Fri, 27 Mar 2015 04:47:22 +0000 hourly 1 http://wordpress.org/?v=4.1.1 By: Lucas Jellema https://technology.amis.nl/2007/10/04/oracle-11g-virtual-columns-to-publish-derived-column-values-without-storing-them-and-more/#comment-4935 Thu, 04 Oct 2007 09:36:06 +0000 http://technology.amis.nl/blog/?p=2424#comment-4935 Arnoud, unfortunately the column expression may only refer to columns in the table on which the Virtual Column is defined.

However, you can use a user defined function in the Virtual Column expression; that function could perform a query from another table! By doing so, you violate the DETERMINISTIC character of the function – on your head be the consequences – and if you do not use the PRAGMA AUTONOMOUS_TRANSACTION you can run into Mutating Table problems, but otherwise it could work that way.

best regards, Lucas

]]>
By: Arnoud Roth https://technology.amis.nl/2007/10/04/oracle-11g-virtual-columns-to-publish-derived-column-values-without-storing-them-and-more/#comment-4934 Thu, 04 Oct 2007 09:28:14 +0000 http://technology.amis.nl/blog/?p=2424#comment-4934 This is really great stuff!
One question: Is is also possible to define a virtual column to a table based on information stored in another table (e.g. add a virtual column address to emp)
Arnoud

]]>