|
subquery in delete: msg#00669db.mysql.general
Hi all, I have a SQL question. If I want to delete all the duplicated record in a table, how can I do that in MySQL? I am using MySQL 3.23.49 on AIX 4.3.3 there is a key field in the table what I want to do is check all the duplicated record by select order_no, count(*) from order group by order_no having count(*) > 1; then these duplicated rows can be all inserted into another table. but I don't know how to delete them from the original table. Thank you Borus --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <mysql-thread112916@xxxxxxxxxxxxxxx> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@xxxxxxxxxxxxxxx> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | g++ 2.96 with Mysql++ 1.7.9: 00669, Poizot Emmanuel |
|---|---|
| Next by Date: | Re: copying the structure of a table to a new table: 00669, Thomas Spahni |
| Previous by Thread: | g++ 2.96 with Mysql++ 1.7.9i: 00669, Poizot Emmanuel |
| Next by Thread: | Re: subquery in delete: 00669, Ralf Narozny |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |