Jdbc getMetaData ampliado

El driver de Oracle nos entrega lo que la espcificación obliga, pero internamente los comentarios los configura en null, para poder simular una consulta de forma de poder extraer los comentarios entonces se puede utilizar

SELECT NULL AS table_cat,
o.owner AS table_schem,
o.object_name AS table_name,
o.object_type AS table_type,
C.COMMENTS AS remarks
FROM all_objects o,ALL_TAB_COMMENTS C
WHERE o.owner LIKE 'tu_esquema' ESCAPE '/'
AND o.object_type IN ('xxx', 'TABLE', 'VIEW')
AND o.owner= c.owner
AND o.object_name= c.table_name
ORDER BY table_type, table_schem, table_name
Publicado en Base de Datos, Desarrollo, Java, Oracle