如何从你不拥有的oracle表中获取列信息(不使用describe)?
发布时间:2020-12-12 15:11:32 所属栏目:百科 来源:网络整理
导读:如何获得他不拥有的,但已选择授权的表上的列信息?这是,不使用DESCRIBE table_name.考虑这个例子: // user bob owns table STUDENTSgrant select on students to josh;// now josh logs in,normally he would dodescribe bob.students;// but he's looking
如何获得他不拥有的,但已选择授权的表上的列信息?这是,不使用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'; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |