Re: user_updatable_columns

From: Tomo <tkokoska_at_varteks.com>
Date: Wed, 11 Jun 2008 13:57:13 +0200
Message-ID: <g2oeqc$lle$1@ss408.t-com.hr>

"Shakespeare" <whatsin_at_xs4all.nl> wrote in message news:484f9399$0$14353$e4fe514c_at_news.xs4all.nl...
>
> "Tomo" <tkokoska_at_varteks.com> schreef in bericht
> news:g2o39c$mr8$1_at_ss408.t-com.hr...
>>
>> "Shakespeare" <whatsin_at_xs4all.nl> wrote in message
>> news:484f879d$0$14345$e4fe514c_at_news.xs4all.nl...
>>>
>>> "Tomo" <tkokoska_at_varteks.com> schreef in bericht
>>> news:g2nvi8$e70$1_at_ss408.t-com.hr...
>>>> if i
>>>> select * from user_updatable_columns
>>>> i get information if column in table is updatable or not, insertable or
>>>> not, deletable or not.
>>>>
>>>> What makes column updatable, insertable, deletable?? Primary key, not
>>>> null
>>>> constraints..??
>>>> please clear my mind!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> USER_UPDATABLE_COLUMNS describes columns in a JOIN VIEW that can be
>>> updated by the current user.
>>
>> Yes, but why one column is updatable or other is not..is it depend on
>> create table statement??
>>
>>>
>>> Shakespeare
>>>
>>
>>
>
> No it is how your CREATE OR REPLACE VIEW statement is built. It's not
> about tables, but about views. If you update a view, Oracle must be able
> to find (uniquely) the underlying row in one of the tables the view was
> composed of.

if query is written with rowid then every row will be uniquely recognized. So if i understand you right every column will be updatable.

for example ..
create or replace view view_emp_dept as
select e.*, e.rowid rowemp, d.*, d.rowid rowdept from
emp e, dept d
where e.deptno = d.deptno

in USER_UPDATABLE_COLUMNS every column from emp and dept could be updatable???

>
> Shakespeare
>
Received on Wed Jun 11 2008 - 06:57:13 CDT

Original text of this message