https://www.sqlite.org/sqldiff.html
By default it compares whole databases, but it can be told to only compare a specific table in each:
sqldiff -t mytable database1.sqlite database2.sqlitehttps://www.sqlite.org/sqldiff.html
By default it compares whole databases, but it can be told to only compare a specific table in each:
sqldiff -t mytable database1.sqlite database2.sqlite> why isn't it a standard feature of SQL to just compare two tables?
Not enough people have complained about needing it (it doesn't hit the desired ROI for a PM to prioritize the feature request).
SQLite's SQL Diff I first came across years ago - super useful. It's the perfect example of the industries which pop up to fill in the gaps that huge software vendors like Microsoft leave open. I used to work at a company valued at hundreds of millions of dollars, which made nothing but such products filling gaps.
So it's really a question of why SQL, the language, doesn't come with a table comparison command so that you can write statements akin to "SELECT * FROM (COMPARE table1 table2) AS diff WHERE ..."
I mean it's not the SQL language itself which sits in the committe specifying new features, it would be representatives from Oracle, Microsoft, IBM and similar.. Right?
This is roughly the same problem. The feature exists, but it's rare enough that the only people that need it are programmers/DBAs that need to deep-dive into a specific issue. Regular people/applications will never need this feature, so why should it be baked in the core language? The specialists already have specialist tooling, so it makes much more sense to implement this as a toolkit feature than a language feature.