Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Optimizing a SQL to avoid using a UNION
Divers
Thread ID:
00543106
Message ID:
00543106
Vues:
57
I have a SQL where I am using a UNION. I would like to know if there would be a way to obtain the same without using the UNION.
The SQL is like this:
SELECT MainTable.Numero FROM MainTable INNER JOINChildTable;
ON MainTable.IGroupe=ChildTable.IGroupe WHEREChildTable.No_Membre=7;
UNION;
SELECT MainTable.Numero FROM MainTable WHERE MainTable.IGroupe=0