Hello,
I assume that table A has some id, so lets take example table A:
create table A (
id int not null,
atr1 int,
atr2 int,
loan char
)
go
now let's have some table B
create table B (
id int not null,
atr1b int,
atr2b int,
)
go
Now you can write SP for comparing desired...