Solved

Oracle merge/update into view?

Posted on 2008-10-23
1
765 Views
Last Modified: 2013-12-18
If I have a view such as the following would there be any difference between using merge/update statements on the Products and the view MyProducts?
CREATE VIEW MyProducts
AS
SELECT * FROM Products, ProductCat
WHERE Product.ID = ProductCat.ProdID
AND ProductCat.Account = 1

Open in new window

0
Comment
Question by:evotsi
1 Comment
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 22789842
yes, depending on which columns, if any, are constrained to be unique, the view may not be updateable.


plus, the view acts as a filter.  If a product does not have a corresponding row in the productcat table with account = 1 then that product won't show up in the view, so you won't be able to apply updates to it but you could against the base table
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question