Home arrow MySQL arrow Page 6 - Speaking SQL (part 1)

Termination With Extreme Prejudice - MySQL

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.

TABLE OF CONTENTS:
  1. Speaking SQL (part 1)
  2. Turntables And Records
  3. Relationships
  4. Not Your Type?
  5. Changing Things Around
  6. Termination With Extreme Prejudice
  7. Old Data For New
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 7
December 21, 2000

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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)



 
 
>>> More MySQL Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
   

MYSQL ARTICLES

- Xeround Releases Free Version of MySQL Cloud...
- Oracle Announces New MySQL Specialization
- Constant Contact Chooses SkySQL for MySQL Su...
- Revoke Statement in MySQL
- The Grant Statement in MySQL
- SuccessBricks Announces ClearDB Availability...
- Building a PHP ORM: Deploying a Blog
- TROSYS Launches Free MySQL Manager and Admin...
- Building an ORM in PHP: Domain Modeling
- Building an ORM in PHP
- MySQL Leads Open Source Market, Gets Cluster...
- Oracle Announces Milestone Release for MySQL
- How to Stop SQL Injection Attacks
- New Defragmentation Solution for SQL Server
- Comparison of MyISAM and InnoDB MySQL Databa...


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap

Dev Shed Tutorial Topics: