Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    1

    Unanswered: Key preserved table

    Hi,
    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
    emp_data as
    select e.empid,e.name,d.deptno,d.dname,a.address
    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?

    Thanks,
    Singu.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •