use UNION ALL or UNIONSELECT *FROM(SELECT name,age,date FROM table2WHERE date>=DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)AND date<DATEADD(dd,DATEDIFF(dd,0,GETDATE()),1)UNION ALLSELECT name,age,date FROM table1 tWHERE date>=DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)AND date<DATEADD(dd,DATEDIFF(dd,0,GETDATE()),1)AND EXISTS(SELECT 1 FROM table2 where date>=(dd,datediff(dd,0,t.date),0) and date<(dd,datediff(dd,0,t.date),1) AND name=t.name)UNION ALLSELECT name,age,date FROM table3 tWHERE EXISTS(SELECT 1 FROM table2 where date>=dateadd(dd,datediff(dd,0,t.date),0)-1 AND date<dateadd(dd,datediff(dd,0,t.date),0) AND name=t.name))t