How to return null to records that do not include in the inner join

Hello all,

I have this first table:

Emp
ID F_Name L_Name
1 Aa Aaa
2 Bb Bbb
3 Cc Ccc
4 Dd Ddd

and this second table:
ID: employeeID
Seq: The amount of phone numbers each employee has.

Phones
ID Seq Num
1 1 111
1 2 222
2 1 333
4 1 222

I want to write a select that will bring all employees with their phone numbers and will return null to employees that do not have a phone number.

Can anyone help with this?

Select 
      a.ID
   ,  b.PhoneNumber
from 
    EMP  a 
       left join 
     PHONES  b
           on a.ID = b.ID
1 Like