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, 4910👍, 0💬
Popular Posts:
Should synchronization primitives be used on overrided bean methods? No. The EJB specification speci...
How do you locate the first X in a string txt? A) txt.find('X'); B) txt.locate('X'); C) txt.indexOf(...
.NET INTERVIEW QUESTIONS - How can you avoid deadlock in threading? A good and careful planning can ...
What are different properties provided by Objectoriented systems ? Following are characteristic’s of...
How do you handle change request? Normally change request are handled by preparing an Impact analysi...