Past ExamsRwanda ICT preparation

Topics / Database

Two queries return lists of email addresses from the Staff and Contractors tables. What is the difference between combining them with UNION and with UNION ALL?

Deux requêtes renvoient des listes d'adresses e-mail tirées des tables Staff et Contractors. Quelle est la différence entre les combiner avec UNION et avec UNION ALL ?

Answers
AUNION ALL removes duplicates, while UNION keeps every single row from both queriesUNION ALL supprime les doublons, tandis qu'UNION garde toutes les lignes des deux requêtes
BUNION joins columns side by sideUNION juxtapose les colonnes côte à côte
CUNION removes duplicate rows; UNION ALL keeps them all and is fasterUNION supprime les lignes en double ; UNION ALL les garde toutes et est plus rapide
DThere is no differenceIl n'y a aucune différence
The answer and explanation are in the full bank.

This question is one of 2,831 in the paid banks. Each comes with the correct answer and the reasoning behind it, not just a mark.

Unlock for 5,000 RWF

MIFOTRA exam practicealigned to Practice set: Database Management·2 marks·Medium

More Database questions