Create an SQL query for the following:
Show all fields of any records with Express Air as ShipMode if the OrderPriority is either high or critical.
All of these fields are in a table names Invoices.
SQL Query :
SELECT * FROM Invoices WHERE ShipMode = 'Express Air' and OrderPriority IN ('high', 'critical');
Explanation:
1. Here, we have used the WHERE clause to find the rows in the table which has ShipMode as Express Air.
2. To find the rows in a table which has OrderPriority is either high or critical, we used the IN operator as OrderPriority IN ('high', 'critical').
3. To find the common rows which as ShipMode as Express Air and OrderPriority is either high or critical, we have used the and operator.
Get Answers For Free
Most questions answered within 1 hours.