sql query help needed

Discussion in 'General Web Coding' started by mmsmns, Jun 21, 2010.

  1. mmsmns

    mmsmns Guppy

    hi

    i have 3 tables

    1- occupation (occupation_id pk)
    2- employee(cpr_number pk, occupation_id fk)
    3- school(school_id pk, cpr_number fk)

    i want to display all occupation from occupation table for each school if the occupation was filled with an employee display cpr number otherwise display null in the cpr field column

    e.g.

    school a

    head 8888888
    vice null
    teacher physics 9999999

    please help

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services