6
Answers

Not matched records in sql using joins

Photo of venkat

venkat

6y
631
1
Hi all ,
Below i have two tables , 1st table contain 12 records and second one contain 8 records. now i need to  get remain 4 records only not with 8 records using joins in sql. i have tried below query  but still am not getting .please help on this
 
Select DISTINCT it.ShapeName,it.Intervalyear,it.IntervalMonth from @yearTable yt
left JOIN @IntervalTable it on yt.NumDays=it.IntervalNumDays
where  it.Intervalyear is null and it.IntervalNumDays='2018'
 
 

Answers (6)