Solved

Oracle merge/update into view?

Posted on 2008-10-23
1
766 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

735 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