SQL "not in" question?

select bednr from bed
where bednr not in (select distinct bednr from patient);

This does not seem to work. Its basicly to see if a bed is in use or not.

select bednr from bed
where bednr not in (select distinct bednr from patient
where bednr is not null);

One Response to “SQL "not in" question?”

  1. select bednr from bed
    where bednr not in (select distinct bednr from patient
    where bednr is not null);
    References :
    http://www.sql-ex.ru/

Leave a Reply