(Contents)(Previous)(Next)

Deleting Rows

This statement deletes all people having an account equal to 0. The system determines and eliminates the relevant rows.

DELETE FROM person

WHERE account = 0

The result is:

SELECT cno, firstname, name, account

FROM person

Note here, too, that all rows of the table are deleted when a WHERE condition is missing.

The general format of the DELETE statement is:

DELETE FROM..... table name

WHERE........... which rows


(Contents)(Previous)(Next)