A. System Catalogs : Extended System Catalogs : Sample Queries for the Extended System Catalogs for SQL : Example: Select Object Information
 
Share this page                  
Example: Select Object Information
This query selects object information and long remarks, when available, by performing an outer join of ii_objects with ii_longremarks.
select o.object_name, o.object_class,
  o.object_owner, o.short_remark, l.long_remark
  from ii_objects o, ii_longremarks l
  where o.object_id = l.object_i
  union all
select o.object_name, o.object_class,
  o.object_owner, o.short_remark, ''
  from ii_objects o
  where not exists
  ( select *
  from ii_longremarks
  where ii_longremarks.object_id = o.object_id )
order by object_name