Link to home
Start Free TrialLog in
Avatar of tanj1035
tanj1035

asked on

SQL, how to return NULL

Hi Expert,

I have 2 tables
1) Archive Reason

ArchivedDealID              Name
0                                      Sold
1                                      Lost
2                                      Test


2) Deal

ArchiveDealStatus
Null
0
1
2

Select d.archivedealstatus, a.name
from Deal d
left join archivereason a on d. archivedealstatus= a. archivedealID

But the query only returns
archivedealstatus 0,1,2, without Null.

I want to see the result . Thank you!

Archivedealstatus   Name
 Null                            null
0                                 sold
1                                 lost
2                                 test
ASKER CERTIFIED SOLUTION
Avatar of dsacker
dsacker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial