Re: restrict user's view

From: <sybrandb_at_yahoo.com>
Date: 14 Jan 2004 06:32:49 -0800
Message-ID: <a1d154f4.0401140632.1cba9353_at_posting.google.com>


tracykim10_at_yahoo.com.hk (tracy) wrote in message news:<5c91cce9.0401140145.4238995_at_posting.google.com>...
> hi,
> I have a table name stud_info where we stored student's information.
> This is a sharing screen for Undergraduate department and Post
> graduate department.
>
> To differential a student type either in Undergraduate or Post
> graduate is using programme type; 1 is for Undergraduate and 2 for
> Post graduate ;
>
> Now, i want to restrict example, Undergraduate department to view,
> select,update,delete only student Undergraduate's data, same to Post
> graduate department where they only allow to view the Post graduate
> data.
>
> Can somebody provide me instruction and PL/SQL how to do this.
> thank you very much

Just define a view ending in
where programmetype = 1
with check option
and grant access to the view.
The view can have the same name as the original table.

That is all.

Sybrand Bakker
Senior Oracle DBA Received on Wed Jan 14 2004 - 15:32:49 CET

Original text of this message