Обсуждение: Re: [SQL] locked my keys in the car

Поиск
Список
Период
Сортировка

Re: [SQL] locked my keys in the car

От
"Phil R Lawrence"
Дата:
>So my next question is:
>Is there a way, using SQL, to do the math on this, i.e., to rm the
>patients who appear twice - once in the first query, once in the second?
>(God forbid we re-admit the same patient at some future date!)


Try MINUS.

SQL1
    MINUS
SQL2

yields SQL1's results minus any also found in SQL2.