Finding UnMatched Records in SQL

preview_player
Показать описание
Short video for finding unmatched records using the LEFT JOIN ... WHERE IS NULL pattern.

Рекомендации по теме
Комментарии
Автор

OMG this is amazing! Thank you so much! I have been wracking my brains for ages trying to work out how to do this using not exists. This is just perfect.

stuartbenjamin
Автор

This was almost exactly what I was looking for. Not sure which db you're using here, but I"m in Microsoft's AdventureWorks2019 and there is a Production.Product.ProductID field but no matching ProductID field in the Production.ProductCategory table. So I'm trying to see if there's an easy way to match keys, and it looks like I have to go through Production.ProductSubcategory that has matching ProductSubcategoryID, then that will match with the ProductCategory table. So this seems too confusing, and I was hoping to find an easier way. How do you usually do this?

bryanstark
Автор

Thank you for the helpful explaination

shahidshariff
Автор

Hi Doug, Thank you. Please may I know how to compare two database tables from two separate environments like Production and Test Environments. I use Debeaver or other free SQL editors. Is there a way to have two connections and I can compare?

granand
Автор

Thank you sir this video helped me understand better.
🇮🇳🇮🇳🇮🇳🇮🇳

TheBeast-geuz