开发者

How to check that the to which table the view is currently pointing to in oracle?

开发者 https://www.devze.com 2023-03-09 20:31 出处:网络
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 po

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';
0

精彩评论

暂无评论...
验证码 换一张
取 消