Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding orphan records
Message
 
 
À
23/01/2009 09:34:42
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01376524
Message ID:
01376527
Vues:
13
>If I have a table that could be tied to a couple other tables, which could have dependents themselves, how could I find records that have no parent/grandparents?

select Child.* from Child LEFT JOIN Parent on Child.FK = Parent.PK where Parent.PK IS NULL

This query works faster than subselect.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform