如何获得他不拥有的,但已选择授权的表上的列信息?这是,不使用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';