Deleting Rows

DELETE FROM book WHERE cond = 'poor'; 

Assume that you have decided that it is time to permanently retire any books in your library that are in poor condition. The simple DELETE query in the phrasebox accomplishes exactly that.

The basic syntax for DELETE is

DELETE FROM table_name WHERE some_conditions; 

The WHERE clause used in the DELETE command is the same familiar WHERE clause used in SELECT and UPDATE commands. For more information, see Chapter 4.

MySQL Phrasebook. Essential Code and Commands
MySQL Phrasebook
ISBN: 0672328399
EAN: 2147483647
Year: 2003
Pages: 130

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: