Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A simple SELECT statement contains a single SELECT like "SELECT ....".

Code Block

SELECT name, area from table1

...

A UNION compound SELECT expression will append the table resulting from the second SELECT expression to the table resulting from the first SELECT. It looks like this:

Code Block

SELECT name, area from table1 UNION SELECT name, area from table2

...

A compound SELECT using INTERSECT will keep all rows that are present in both tables:

Code Block

SELECT name,  area from table1 INTERSECT SELECT name, area from table2

...

A compound expression using EXCEPT is conceptually similar to subtracting one table from another. For example, the following statement will subtract the rows of table2 from table1:

Code Block

SELECT name,  area from table1 EXCEPT SELECT name, area from table2

...

  1. Open the SQL query editor
  2. Click the SQL Wizard button and click Compare Tables. The welcome page of the table comparison will appear. Click Next.
  3. Select the two tables that you wish to compare.
  4. In the report page, select whether to compare attributes, geometry or features IDs (FID).
  5. In the operation selector you can select which tables will constitute the operands of the comparison expression. Note that the EXCEPT operator is not symmetrical: table1 EXCEPT table2 is generally not the same as table2 EXCEPT table1.
  6. Click Finish
  7. Make any final modifications to the SQL statement in the SQL query editor
  8. Click Execute. The result table will be listed in the editor.