News for hackers. Stuff that matters.
Re:How to Check 2 SQL Tables Are the Same by justinclift on Friday July 28, 2023 @08:30AM (#36905874)
On the more practical side, SQLite has the "sqldiff" utility:

https://www.sqlite.org/sqldiff.html

By default it compares whole databases, but it can be told to only compare specific a specific table in each:

    sqldiff -t mytable database1.sqlite database2.sqlite
Re:How to Check 2 SQL Tables Are the Same by RajT88 on Friday July 28, 2023 @09:59AM (#36906879)
Indeed.

> 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.

Re:How to Check 2 SQL Tables Are the Same by murki on Friday July 28, 2023 @10:38AM (#36907438)
isn't that what MS SQL Server's tablediff does? https://learn.microsoft.com/en-us/sql/tools/tablediff-utilit...
Re:How to Check 2 SQL Tables Are the Same by TheRealPomax on Friday July 28, 2023 @11:43AM (#36908564)
SQL isn't any specific product for a PM to greenlight work on or not, it's a programming language (the L in SQL =) that an structured (the S in SQL =) data application can support as either "the" or "one of the" programming interfaces to query (the Q in SQL =) that data.

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 ..."

Re:How to Check 2 SQL Tables Are the Same by tuwtuwtuwtuw on Friday July 28, 2023 @12:06PM (#36908948)
Wouldn't the process be that some PM wants a feature to be added and sends it of to the representative in the appropriate committe who then push for it to be added?

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?

Re:How to Check 2 SQL Tables Are the Same by tremon on Friday July 28, 2023 @06:05PM (#36913980)
If some PM wants to add a debugger to C, do they write a language extension proposal or do they focus on putting their requirements in a separate tool?

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.