var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: difference between two tables
Iam looking out for difference in data between two similar tables.Since minus was not working, I tried using not exists using the following query to retrieve A-B functionality
select * from table A a1 where not exists (select * from table B b1 where a1.key1=b1.key1 and a1.key2=b1.key2 and a1.key3=b1.key1)
here my problem is i do not have a primary key field, but a unique combination of 3 fields.therefore, I tried the above option.
When i execute this ...the results are wierd..im confused.
Is there any other way i can acheive this, such that I can get records from table A which are not similar to that of table B.
Appreciate a quick help.
Thanks...!!Its a typo...!!
it should be a1.key3=b1.key3....
select * from A where not exists (select 1 from b where a.1 = b.1 and a.2 = b.2 and a.3 = b.3)
Hi thanks for your suggestion. It helped for me also.