Structured Query Language is the language used to communicatewith databases of all shapes, sizes and varieties. If you're building a Webapplication which needs to communicate with a database, and don't knowwhere to start, this article will get you up to speed on the basics ofcreating tables and inserting data into them.
Just as you INSERT records into a table, you can also DELETE records with the DELETE command, which looks like this:
DELETE FROM <table_name>
For example, the command
mysql>
DELETE FROM members;
Query OK, 0 rows affected (0.06 sec)
would delete all the records from the "members"
table.
You can select a specific subset of rows to be deleted by adding the WHERE clause to the DELETE statement. The following example would only delete those records which had a member id of 16;
mysql>
DELETE FROM members WHERE member_id = 16;
Query OK, 1 row affected (0.06 sec)