Ofline
6664 days on xHamster
17895M profile views
54981K subscribers
85979 comments left

Oracle updating through a view

Sorry, i didn't see your last links which link to instead of triggers. When you create a business component on a view, the rowid is used for primary key, which it tries to determine after an insert.One thing to note about instead of triggers: insert ... You can explicitly prevent users from modifying the base table through your View by creating it with the WITH READ ONLY clause.That signals to Oracle that your View is meant for querying only.Here's what I mean: you can restrict access to a base table, and then create a view containing only rows and columns that you wish to be accessible. Quick hint: read up on the WITH CHECK OPTION to prevent changes to base table rows to which you're trying to restrict access. " Because inserting/updating data in a View depends on the View. Well a View is just a stored query against some base tables.When you're executing DML operations on a View, Oracle actually executes those DML operations appropriately on the base tables.

When you update record(s) in a VIEW, it updates the records in the underlying tables that make up the View.

I was recently asked by a former colleague "Can you insert data in an Oracle table through a View?

"In some cases, yes you can, and it actually serves as a handy technique to manage security on your data.

However, if you try to query the Oracle VIEW after the table has been dropped, you will receive a message indicating that the Oracle VIEW has errors.

If you recreate the table (the table that you had dropped), the Oracle VIEW will again be fine.

For example, and along the same lines of reasoning, if the View contains a SET, DISTINCT, GROUP BY, GROUP, ORDER BY, CONNECT BY, START WITH, then Oracle can't perform any update or insert operations on the View.

Please or register to post comments
If spammers comment on your content, only you can see and manage such comments Delete all

Oracle updating through a view introduction

Oracle updating through a view

Recent posts

04-Dec-2018 16:38
04-Dec-2018 23:44
05-Dec-2018 08:18