I've got a few users in Oracle database, let's say UserOne, UserTwo and UserTree with same and not empty table with name - "tableExample".
In my case I need to initialize ResultSet throught getColumns() method:
DatabaseMetaData md = conn.getMetaData();
ResultSet r = md.getColumns(null, "UserTwo", "tableExample", null);
while(r.next())
{
//Do something;
}
In above example r.next() is true, but when I'm using UserOne or UserTree r.next() is false.
How can I solve this issue so to achieve this table's ResultSet regardless of which user I have chosen?
*If I use:
ResultSet r = md.getColumns(null, null, "tableExample", null);
I will receive result for all users into database, but I need to dynamically concretize users using the second argument in this method.