How would one get columns information on table which he doesn't own, but has select granted? This is, without using DESCRIBE table_name
. Consider this example:
// 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
Any ideas? Is this even doable?
select column_name from all_tab_columns where table_name = 'STUDENTS';
edit: or, even better
select owner, column_name from all_tab_columns where table_name = 'STUDENTS';
Have a look on oracle data dictionary, it should help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With