Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Delete Multiple Rows from a Table
How To Delete Multiple Rows from a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements
✍: FYIcenter.com
You can delete multiple rows from a table in the same way as deleting a single row, except that the WHERE clause will match multiple rows. The tutorial exercise below deletes 3 rows from the fyi_links table:
mysql> SELECT id, url, notes, counts FROM fyi_links WHERE id > 300; +-----+-------------------+-------+--------+ | id | url | notes | counts | +-----+-------------------+-------+--------+ | 801 | moc.retneciyf.ved | Wrong | 1602 | | 802 | moc.retneciyf.abd | Wrong | 1604 | | 803 | moc.retneciyf.aqs | Wrong | 1606 | | 810 | | Wrong | 1620 | | 700 | moc.retneciyf.www | Wrong | 1400 | +-----+-------------------+-------+--------+ 5 rows in set (0.00 sec) mysql> DELETE FROM fyi_links WHERE id > 300; Query OK, 5 rows affected (0.00 sec) mysql> SELECT id, url, notes, counts FROM fyi_links WHERE id > 300; Empty set (0.00 sec)
2007-05-11, 4806👍, 0💬
Popular Posts:
What is Windows DNA architecture? Note :- If you have worked with classic ASP this question can come...
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...
How To Process Query Result in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL You can run queries...
How To Concatenate Two Character Strings? - MySQL FAQs - Introduction to SQL Basics If you want conc...
Explain all parts of a deployment diagram? Package: It logically groups element of a UML model. Node...