As a variation of "Producing Rows from the First Query or the Second Query" below code should do:
proc sql; create table want as
select * from Company where Deptid not in (select Deptid from Dept) outer union corr select * from Dept where Deptid not in (select Deptid from Company) ; quit;
2025 SAS Hackathon: There is still time!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!