Skip to content

SQL compare two tables

ghdrako edited this page May 3, 2024 · 1 revision

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
select * from (
    (
      select *
      from table1
      minus
      select *
      from table2
    )
    union all
    (
      select *
      from table2
      minus
      select *
      from table1
    )
  )

reply

Test

Clone this wiki locally