Skip to content

BETWEEN

SELECT * FROM Orders
WHERE OrderDate BETWEEN '1996-07-01' AND '1996-12-31';
+--------+----------+------------+---------+-----------+--------+
| OrderID| CustomerID | OrderDate | Product | Quantity | Price |
+--------+----------+------------+---------+-----------+--------+
| 10248 | 90 | 1996-07-04 | 5 | 12 | 20.00 |
| 10249 | 81 | 1996-07-05 | 2 | 20 | 45.00 |
...

The SQL commands above select all records from the Orders table where OrderDate is within the range of ‘1996-07-01’ and ‘1996-12-31’, inclusive. The ellipsis in the output represents other rows fitting the criteria that are not shown.