Skip to content

Instantly share code, notes, and snippets.

@mpmont
Created March 28, 2012 14:25
Show Gist options
  • Save mpmont/2226601 to your computer and use it in GitHub Desktop.
Save mpmont/2226601 to your computer and use it in GitHub Desktop.
SELECT TOP 10 *
FROM Doctor AS D, Doctor_Hospital AS DH, Hospital AS H
JOIN Doctor ON Doctor.DoctorId = Doctor_Hospital.DoctorId
JOIN Hospital ON Doctor_Hospital.HospitalId = Hospital.HospitalId
@dcs619
Copy link

dcs619 commented Mar 28, 2012

SELECT TOP 10 *
FROM Doctor AS doctore
JOIN Doctor_Hospital
ON Doctor.DoctorId = Doctor_Hospital.DoctorId
JOIN Hospital
ON Doctor_Hospital.HospitalId = Hospital.HospitalId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment