I have table A and table B . I have to compare this tables records and insert data to table C using SQL Server procedure in below format
table A
name
You could try using a some union and left join
select A.name, case when is null t1.name then 'newly addedd' end
from A
left JOIN (
select A.name from A
union B.name from B
) t1
union
select B.name, case when is null t1.name then 'delete' end
from B
left JOIN (
select A.name from A
union B.name from B
) t1