如何在桌面上获取他不拥有的列信息,但是已经选择了授权?这是,不使用DESCRIBE table_name
.考虑这个例子:
// user bob owns table STUDENTS
grant select on students to josh;
// now josh logs in, normally he would do
describe bob.students;
// but he's looking for something along the lines
select column_name from user_tab_columns where table_name = 'STUDENTS';
// which doesn't work, as josh doesn't own any tables on his own
有任何想法吗?这甚至可行吗?
select column_name from all_tab_columns where table_name = 'STUDENTS';
编辑:或者,甚至更好
select owner, column_name from all_tab_columns where table_name = 'STUDENTS';