JDBC DatabaseMetaData.getColumns() returns duplicate columns

前端 未结 5 1326
南方客
南方客 2020-12-15 19:17

I\'m busy on a piece of code to get alle the column names of a table from an Oracle database. The code I came up with looks like this:

DriverManager.register         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 19:59

    In addition to skaffman's answer -

    use the following query in Oracle:

    select sys_context( 'userenv', 'current_schema' ) from dual;  
    

    to access your current schema name if you are restricted to do so in Java.

提交回复
热议问题