Information: Adding | Updating | Retrieving | Removing | PHP and MySQL
Remove Information - Page 92

092 You should keep your database up to delete by deleting obsolete information.
   You can delete or remove a row from a table with the DELETE query.

092 Here is the format for the DELETE Query:
   DELETE FROM tablename WHERE clause

092 Be extremely careful when using the DELETE query.
   Using the DELETE query without a WHERE clause will delete all the data of a table.
   The data cannot be recovered.

092 You can delete a column from a table by using the ALTER query.

092 Here is the format for the ALTER Query:
   ALTER TABLE tablename DROP columnname

092 Or
you could remove the entire table from the database with the following query
   DROP TABLE tablename

092 Or you could remove the entire database with the following query
   DROP DATABASE databasename


This site is for the private use of my students. (2008)

Information: Adding | Updating | Retrieving | Removing | PHP and MySQL