WHERE
clause to the SELECT
statement.
The following example creates and populates a Customers
table using the following SQL commands:
CREATE TABLE Customers ( ID INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(16) NOT NULL ); INSERT INTO Customers (name) VALUES ('Ben'), ('Bart'), ('Mandy'), ('Ella'); |
BETWEEN ... AND
operator:
SELECT * FROM Customers WHERE ID BETWEEN $low AND $high; |