You could use cursors to loop through the records in your tables and do comparisons but there may be a more efficient way to do it. Give me some more details about what exactly you need to do, table structure, fields your comparing, etc. and I'll try to give some help.
Shanti