Computer Science for IGCSE & O level - Databases (Section 1 - No. 28)

In a car database, how could you use SQL to find all combinations of red seat colour and silver paint colour?
SELECT * FROM CAR WHERE SeatColour = 'Red' AND PaintColour = 'Silver';
SELECT * FROM CAR WHERE SeatColour = Red OR PaintColour = Silver;
SELECT Red, Silver FROM CAR;
FIND CAR with SeatColour = 'Red' AND PaintColour = 'Silver';

Explanation

The correct SQL command uses SELECT, FROM, and WHERE, with the AND operator to combine the criteria.

Comments (0)

Advertisement