Home » SQL & PL/SQL » SQL & PL/SQL » Some About "VIEW" (I want to create an updateable view?)
icon2.gif  Some About "VIEW" [message #273569] Wed, 10 October 2007 23:23 Go to next message
myclassic
Messages: 136
Registered: December 2006
Location: Pakistan
Senior Member
Dear fellows
it is generally said that "Views" are not updateable. but some time if we create a view consisting of only one table and having all "Not Null" Columns in it, you may update view / records in the view.

But is there any way to get an updateable view inspite of having joins(including more than one table)?????

waiting for your responce.
Regards.
Re: Some About "VIEW" [message #273590 is a reply to message #273569] Thu, 11 October 2007 01:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Yes, it is possible.

You can also see if view/columns are updatable using the %_UPDATABLE_COLUMNS views.

Regards
Michel
Re: Some About "VIEW" [message #274040 is a reply to message #273590] Fri, 12 October 2007 23:55 Go to previous message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
You may join as many tables as you please in an Updateable Join View, but only ONE of the tables columns will be updateable.

Let's say you are joining tables A, B, C, D, and E; and you want table A's columns to be updateable. You MUST join B, C, D, and E using the entire primary key (or a chosen unique key) from each table with equality (=) predicates. This is called "key-preservation".

Search on Key Preserved or Updateable Join View for more info.

Ross Leishman
Previous Topic: need help in exception handling
Next Topic: oracle 10 new features and flashback query
Goto Forum:
  


Current Time: Sat Feb 15 18:17:04 CST 2025