Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using having without group by
Message
De
30/12/2000 18:22:30
 
 
À
24/12/2000 13:50:57
Cindy Winegarden
Duke University Medical Center
Durham, 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:
00456657
Message ID:
00458150
Vues:
35
So the only difference is that WHERE is rushmore optimizable but
HAVING is NOT rushmore optimizable ?

Why there is a such difference in VFP ?
Can HAVING without group by used in all SQL servers ?

>Andrus,
>
>Mark is right - you are better off using WHERE.
>
>WHERE selects only those records that meet the specified condition and retrieves only those records.
>
>HAVING retrieves all records and then throws away the records it doesn't need. That means you have the "cost" of bringing way too much data over the network.
>
SELECT ;
>    < complex expression > ;
>    FROM MyTable ;
>    WHERE BETWEEN(MyValue, 1, 1000) ;
>    INTO CURSOR MyCursor ;
>    ORDER BY MyOrder
>
>
>>Using having without group by
>>
>>Is it OK to use having without group by in SQL SELECT ?
>>
>>I want to place additional filter to result columns,
>>like:
>>
>>Select ;
>> as myvalue, ;
>> from mytable ;
>> having betw( myvalue, 1,100 )
>>
>> is a very complex expression and i don't wish to include it to having clause second time.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform