如何从你不拥有的oracle表中获取列信息(不使用describe)?

前端之家收集整理的这篇文章主要介绍了如何从你不拥有的oracle表中获取列信息(不使用describe)?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
如何获得他不拥有的,但已选择授权的表上的列信息?这是,不使用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';

猜你在找的Oracle相关文章