I have a situation like, I have two tables having same structure. I have a view which points to one of the table. In my store procedure I have to开发者_如何学Python check first which table the view points to and accordingly update the other table and then finally update the view to point to the updated table. How to check that which table the view is currently pointing at??
select referenced_name
from all_dependencies
where name = 'MYVIEW'
and owner = 'MYSCHEMA'
and referenced_type = 'TABLE';
精彩评论