I have this old language aware diff tool I wrote that already supports CSV format, so what I would do is:
1) Check the record length of the two tables given your RDBMS API.
2) Check the column headers and data types of the tables are the same given your RDBMS API.
3) Only then would I export all triggers associated with the given tables using the RDBMS API and then compare that code using an external SQL language aware diff tool that excludes from comparison white space, comments, and other artifacts of your choosing.
4) Then finally if all else is the same I would export each table as CSV format and then compare that output in a CSV language aware diff tool.
This can all be done with shell scripts.