Reputation: 8813
I have a database where a view and a table have same name, when I try to execute query
select * from XXXXXXXXX
from where is this data coming from, view or table? Is there any explicit declaration syntax to tell, to where from select the data?
PS: the DB owner is different so I can't change the structure of view/table or names either.
Upvotes: 2
Views: 2017
Reputation: 44921
Objects names are unique per owner, so the table and the view can't be defined for the same owner.
Qualify the table/view name with the right owner.
select * from table_owner.XXXXXXXXX
select * from view_owner.XXXXXXXXX
Upvotes: 2