postgresql7.2 SELECT t.category_id, t.short_name, t.description, t.ordering FROM rl_resource_category_type t ORDER BY t.ordering SELECT t.category_id as type_id, t.short_name as type_short_name, t.description as type_description, t.ordering as type_ordering, c.category_id, c.short_name, c.description FROM rl_resource_category_type t, rl_resource_category c WHERE t.category_id = c.category_type ORDER BY t.ordering, c.short_name