DELETE FROM
statement is used to delete rows from a database table.
The following example creates and populates a Members
table using the following SQL commands:
CREATE TABLE Members ( ID INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(16) NOT NULL ); INSERT INTO Members( name ) VALUES( '$name1' ); |
DELETE FROM Members WHERE name LIKE '%$name2%'; |