Thread: Key preserved table
07-11-10, 05:00 #1Registered User
- Join Date
- Jul 2010
Unanswered: Key preserved table
What is key preserved table in oracle?
I understand that it is a table in a complex view whose primary key column is present in the view and whose values are all unique and not NULL in the view.
So, i tried to create a view with thee different tables emp, dept and address.
My view script:
create or replace view
from emp e,dept d,address a
where e.empid = a.empid
and e.deptno = d.deptno
When i checked the UPDATABLE_COLUMNS for the view, i can see ADDRESS is updatable. But, address table is having duplicate values in address column.
TABLE_NAME COLUMN_NAME UPDATABLE
EMP_DATA EMPID NO
EMP_DATA NAME NO
EMP_DATA DEPTNO NO
EMP_DATA DNAME NO
EMP_DATA ADDRESS YES
I think only key preserved table are updatable.
But from the definition table can be key-preserved only if it has unique and not null values.
Could any one explain why ADDRESS columns is updatable?
07-11-10, 10:07 #2Registered User
Provided Answers: 1You can lead some folks to knowledge, but you can not make them think.
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.