Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

I think I found the answer to determine whether two SQL tables are equal. Symmetric difference of sets:

A(Symmetric Difference) B = ## A \cup B - (A\cap B) ##. One can show that sets A,B are equal iff

A (Symmetric Difference) B =A (=B, of course)

How does one implement this in the language of MS SQL?

For normalized tables, one can use 'EXCEPT' or 'INTERSECT' , but this does not work for non-normalized tables with repeated records.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Equality of Tables in SQL Part II

Tags:

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads - Equality Tables Part | Date |
---|---|

Testing floating point numbers for equality | Jan 12, 2018 |

MSSQL: Checking for Equality of Tables (Hints only, please) | Feb 12, 2016 |

[C++?] Counting the maximum number of equal objects in a vector | Sep 21, 2012 |

P does equal NP? | Jun 8, 2012 |

Java creating equals method | Oct 24, 2011 |

**Physics Forums - The Fusion of Science and Community**