Questions et réponses d'entretien les plus demandées et tests en ligne
Plateforme d'apprentissage pour la preparation aux entretiens, les tests en ligne, les tutoriels et la pratique en direct

Developpez vos competences grace a des parcours cibles, des tests blancs et un contenu pret pour l'entretien.

WithoutBook rassemble des questions d'entretien par sujet, des tests pratiques en ligne, des tutoriels et des guides de comparaison dans un espace d'apprentissage reactif.

Preparation a l'entretien

SQL Query Questions et reponses d'entretien

Question 36. What is the difference between UNION and UNION ALL?

UNION combines and returns unique rows from multiple SELECT statements, while UNION ALL returns all rows including duplicates.

Example:

SELECT column1 FROM table1 UNION SELECT column1 FROM table2;

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 37. Write a SQL query to find the average salary of employees in each department, excluding departments with fewer than five employees.

SELECT department, AVG(salary) FROM Employee GROUP BY department HAVING COUNT(*) >= 5;

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 38. Explain the purpose of the SQL INDEX.

An INDEX is a performance optimization feature that allows faster retrieval of records from a table. It is created on one or more columns of a table.

Example:

CREATE INDEX index_name ON table(column);

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 39. What is a self-referencing foreign key?

A self-referencing foreign key is a foreign key in a table that references the primary key of the same table, creating a relationship within the same table.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 40. Write a SQL query to find the total salary expense for each department.

SELECT department, SUM(salary) FROM Employee GROUP BY department;

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Les plus utiles selon les utilisateurs :

Copyright © 2026, WithoutBook.