I want to run a query programmatically using java on a sql server database running on our dev environment and production environment and compare the results.
would doing a column by column comparison be the best way to compare the resultsets or is there a better way to do it ?
Thank You
Comparing resultsets would work. The other option would be to create an object for each resultset and compare that. You could define your equals method to handle this, like any other ordinary Java object.
Much of this will depend on what you want to produce in the end. If all you’re only concerned about resultset 1 being different from resultset 2, either method would work.