I have a table like this:
ObjId OtherObjId active (bool)
1 5 0
1 7 1
1 9 0
2 6 0
...
...
...
54 5 0
54 7 1
54 9 0
This two queries return an identical result:
select OtherObj2,active from MyTable where ObjId1 = 1;
select OtherObj2,active from MyTable where ObjId1 = 54;
I would like to run a single query that return return true if the two query result are identical or false if they are not.
The table is a configuration table and I want to test easily if two object have the same configuration. I can perform the check using a store procedure, however I would like to avoid to use it.
I cannot think a way to check it using a query, I am wondering if it is possible.
Any hints?
Thanks for your help.
Don’t know if your DBMS supports except but if it does you can use this.