There are two tables:

Sp: - kod (string 10) - код предприятия уникальнй идентификатор - Name (string 60) - название предприятия - Kod_insp (string 7) - код инспектора Insp: - kod (string 7) - код инспектора - name (string 30) - ФИО инспектора 

Attach inspectors from the second table to the first table, taking into account the possibility that the first table may contain codes of inspectors that are not present in the second.

  • It’s best to start reading T-SQL theory, the question is really very simple. - Yaroslav Schubert


1 answer 1

 SELECT * FROM Sp LEFT JOIN Insp ON Insp.kod = Sp.Kod_insp 
  • Thanks for the help - resident