postgresql7.4 SELECT * FROM cc_stream WHERE package_id = :package_id LIMIT 1 SELECT name, year_id FROM cc_year WHERE package_id = :package_id SELECT name, semester_id FROM cc_semester WHERE package_id = :package_id SELECT year_ids FROM cc_stream WHERE stream_id = :stream_id SELECT name FROM cc_year WHERE year_id = :year_id SELECT session_id FROM cc_session WHERE package_id = :package_id SELECT name from cc_session WHERE session_id = :session_id SELECT uos_code || ' ' || uos_name as name, uos_id FROM cc_uos WHERE package_id = :package_id AND uos_id != :except_uos_id SELECT n.uos_code || ' ' || n.uos_name AS name, uos.uos_id FROM cc_uos uos, cc_uos_name n WHERE uos.package_id = :package_id AND uos.uos_name_id = n.name_id ORDER BY n.uos_code ASC SELECT n.uos_code || ' ' || n.uos_name AS name, n.name_id FROM cc_uos_name n WHERE n.package_id = :package_id ORDER BY n.uos_code ASC SELECT r.name, r.stream_uos_rel_id FROM cc_stream_uos_rel r WHERE r.package_id = :package_id SELECT r.name FROM cc_stream_uos_rel r WHERE r.package_id = :package_id AND r.stream_uos_rel_id = :id