Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Correlated subquery
Message
De
19/03/2021 12:53:38
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
19/03/2021 07:54:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01679045
Message ID:
01679117
Vues:
57
>>I can express
>>
>>select * from MyTable   outside  
>>    where exists   
>>          ( select 1 from DiscountMaster inside where inside.active = 'N')
>>
>>
>>??
>>EXIST () is just EMPTY SET or NOT EMPTY SET. There is nothing said about correlation.
>>
>
>OK, point taken, so I'll paraphrase...I'm hard-pressed to think of any practical example where the subquery with an EXISTS will not be correlated. Correct, you can do that and it will execute, but beyond that, not sure anyone would write that :)

At least it is a way to do an operation if a certain dataset exists or not.
For example if the data for the sub query is changed on something and I guess this query will run once and that might be simpler then bound it into a join. Maybe.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform