Read-Only View

Smike Toppins

Read-Only View
How does one go about making a view read-only? TIA


SMike Toppins
Great-West Life
[login to unmask email]
(303) 737-5094



Mark Doyle

Re: Read-Only View
(in response to Smike Toppins)
It's not really a case of 'making' it read only, it's more a intrinsic
quality of the view. A view is read-only because updates of the view would
violate relational theory or would introduce other anomalies to the data.
An example of one kind of anomality is that the rows/columns that should be
updated by the view are indeterminate.

From the V6 SQL reference:

Read-only views:

A view is read-only if one or more of the following statements is true of
its definition:

| The first FROM clause identifies more than one table or view, or
| identifies a table function
The first SELECT clause specifies the keyword DISTINCT
The outer subselect contains a GROUP BY clause
The outer subselect contains a HAVING clause
The first SELECT clause contains a column function
It contains a subquery such that the base object of the outer subselect,
and of the subquery, is the same table
The first FROM clause identifies a read-only view

A read-only view cannot be the object of an INSERT, UPDATE, or DELETE
statement. A view that includes GROUP BY
or HAVING cannot be referred to in a subquery of a basic predicate.



----- Original Message -----
From: "Toppins, Smike" <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Friday, January 11, 2002 4:33 PM
Subject: Read-Only View


> How does one go about making a view read-only? TIA
>
>
> SMike Toppins
> Great-West Life
> [login to unmask email]
> (303) 737-5094
>
>
>


>

Thomas E. Faglon

Re: Read-Only View
(in response to Mark Doyle)
grant select on the view




"Toppins, Smike" <[login to unmask email]> on 01/11/2002 05:33:48 PM

Please respond to DB2 Data Base Discussion List <[login to unmask email]>

To: [login to unmask email]
cc: (bcc: Thomas E. Faglon/Telcordia)
Subject: Read-Only View



How does one go about making a view read-only? TIA


SMike Toppins
Great-West Life
[login to unmask email]
(303) 737-5094