Solved

Oracle merge/update into view?

Posted on 2008-10-23
1
764 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 73

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

773 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