Re: Problems with triggers

From: Don Vick <dvick_at_lanier.com>
Date: 1995/04/24
Message-ID: <D7JLrD.Lzw_at_lanier.com>#1/1


In article <141_at_along.dialix.oz.au>,
Alex Long <paladin_at_along.dialix.oz.au> wrote:
>
>In article <3n3hpm$6e8_at_guillotine.mtl.dmr.ca>, Frederic Lesieur (Frederic.Lesieur_at_dmr.ca) writes:
>>My problem is that I want to restrict the access on a table to a user
>>under certain condition.
>>
>>I want this user to be able to update the table in the case where
>>a table's field called TYPE is not equal to 'S'. Otherwise, if ='S',
>>then Oracle should send a error message saying that the update
>>of the table is impossible.
>
>Have you tried a view? (CREATE VIEW FEREDERIC AS SELECT * FROM TABLE
>WHERE TYPE = 'S'?) and then grant the user acces to the view.
>

If you want the user to be able to insert into the table, you will want to add WITH CHECK OPTION to the view definition. This prevents the user from creating any rows he is not allowed to see.



Donald E. Vick (dvick_at_lanier.com, dvick_at_crl.com) Voice: (404) 493-2194 Fax: (404) 493-2399 Received on Mon Apr 24 1995 - 00:00:00 CEST

Original text of this message