There is a table Main ( key int, filed1 int, ...) and subordinate
Fields ( id int, name varchar (256)).

There is a relationship Main . filed1 -> Fields . id (or how to properly designate? "<-"?).
It may be that Main . filed1 = NULL , i.e. Not for all records of the main table is. record in the subordinate table.

Task : you need to display all records Main : Main . key AS key , Fields . name AS Name .
For Main entries. filed1 = NULL , in the Name column output NULL .

UPD
I know how to display only those records for which there is a subordinate record and how to display only those records for which there is no subordinate record. And how to display all these records in one query?

Decision
The solution was simple:
select Main . key , Fields . Name from Main left join Fields on Main . field1 = Fields . id

    1 answer 1

      LEFT JOIN RIGHT JOIN A EXCEPT B (забыл про него) 
    • Do I understand correctly, you need to combine the results of two queries? Real requests are complex and long. - Ildar
    • If you need to output from Main IDs for which there is no information in Fields then SELECT field1
    • Not what I needed, nevertheless, thanks, put things on the decision. - Ildar