I have a problem with create view for user U1 when I want to make view V1 as select * from T1 and user U1 has grant select on T1 with role R1. I haven't had any problem when I want do select * from T1, but when I want create view as below, the error "table or view does not exist" appeared:
create view V1 as select * from T1
I accessed T1 only with role R1 and I can't create a public synonym for T1. How can I create this view with this priviledge and synonym? And why can't we create view on tables that we have grants on with role and they can't have public synonym? Thank you for your attention and your help.
Since view V1 is an object and if you are the owner, you have to grant select on view V1 to user U1 just as you did for table T1. If you do not want to create a synonym for V1 then U1 can access the view by prefixing the view using the owner's name. For example if the owner of the view is Fatima, the SQL statement will look like:
Select * from fatima.V1;