Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare Two Tables 1

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello All,

Would any of you have a script or technique you could share that compares two tables to ensure the data contained within them is identicle?

I would like to go a little further than a simple SELECT count(*).

Thanks,

Michael42
 
Michael,

Code:
select * from table1
minus
select * from table 2;

Then,
Code:
select * from table2
minus
select * from table1;

will detect absent and surplus records.

Regards

Tharg


Grinding away at things Oracular
 
thargtheslayer,

Thanks for posting. It is simple and very effective! :)

Thanks,

Michael42
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top