Пусть имеются отношения S – поставщики, P – детали и SP – поставки. Получить имена поставщиков, поставляющих все детали.

  • Среди приведенных - нет правильного.
  • S.Sname From S Where Not Exists (Select * From P Where Not Exists (Select * From SP Where SP.S#=S.S# and SP.P#=P.P#)) ;
  • Select S.Sname From S Where Not Exists (Select * From P Where Not Exists (Select * From SP Where SP.S#=S.S# and SP.P#=P.P#)) ;
  • Select Distinct S.Sname From S Where Exists (Select * From P Where Exists (Select * From SP Where SP.S#=S.S# and SP.P#=P.P#)) ;
  • Select Distinct S.Sname From S Where Not Exists (Select * From P Where Not Exists (Select * From SP Where SP.S#=S.S# and SP.P#=P.P#)) ;

К сожалению, у нас пока нет статистики ответов на данный вопрос, но мы работаем над этим.