db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Thalamati <suresh.thalam...@gmail.com>
Subject getColumns(...) and quoted table names ?
Date Wed, 22 Jun 2005 18:47:00 GMT

I have  a table that uses reserved word as name , so it is quoted like : 
create table "ORDER"(a int ) ;
All  SQL queries seems to expect it as quoted name , except Database 
Metadata getColumns(..).

 DatabaseMetaData dmd = conn.getMetaData();
 ResultSet rs = dmd.getColumns(null, null , "\"ORDER\"" , null) ;
 does not return  any column information , where as
 
 ResultSet rs = dmd.getColumns(null, null , "ORDER"" , null) ;
 retunns the  "ORDER"  table columns Information.

 I am wondering what  is the correct usage here ,  i.e  does metadata 
calls suppose to
 expect   quoted tables names like SQL or  the  one without quotes ?

Thanks
-suresht

   


Mime
View raw message