Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>Fabio,
>
>>3.
>>complex:
>>a complex application has 10000 select and allows to combine her in 10000 ways,
>>in this case a lot of UNION can unite select with different names;
>>is it reasonable to impose that all the select have the same names to be able to unite her?
>>This is not a restriction in SQL.
>
>Well let's see. If you only aliased the first select and none of the other 9,999 SELECT statements you'd get the desired end result and have saved several hundred thousand keystrokes and gained a significant reduction in the size of the executable.
>
As always your vision is very restrictive.
Every single SELECT can be used alone,
and therefore it has to have some proper names;
the engine that assembles is more
simple to write (and it is written in SQL Server env) if the names are
always those of the select number 1, vice versa
it has to check the clause UNION and the clause ORDER BY,
and if it is present to move the SELECT 1 to the last place.
>So that would be my suggestion. You are free to ignore it if you disagree with it.
This is few but sure.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement