The example provided in OracleDataReader Class doc works fine. I was able to retrieve the metadata.
But for the query "select * from(select name, age, rollno from student) a", I am not able to view the base table name. primary key, it always returns empty.
Is this the default behavior?
Yes, it is default behavior. You have to specify the CommandBehavior.KeyInfo in a query without subqueries. Otherwise, the key information is not obtained.
I need to find a way to retrieve metadata in case of inline view query.