postgresql7.1 SELECT as_assessments.assessment_id, as_assessments.name, as_assessments.definition, as_assessments.enable_p FROM as_assessments SELECT assessment_id, as_sections.section_id, as_sections.name, as_sections.definition FROM as_sections JOIN as_assessment_section_map ON (as_sections.section_id=as_assessment_section_map.section_id) WHERE assessment_id=2