Re: deleting rows which table1.row=table2.row
On Tue, 14 Oct 2003 11:55:18 +0200 (CEST) <[EMAIL PROTECTED]> wrote: > i have mysql version 3.22 perhaps you mean 3.23 ? but no matter, it's time to upgrade definitely. --- WBR, Antony Dovgal aka tony2001 [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: deleting rows which table1.row=table2.row
yes, sorry. my intention is to delete repeated rows from TABLE1. and since its a bit difficult with mysql the way that i take is create a new table TABLE2 with the repeated rows (but not repeated in TABLE2), and then i want to delete from TABLE1 all the rows which also are in TABLE2. later on, i INSERT again the values from TABLE2 to TABLE1. i have mysql version 3.22 thanks On Tue, 14 Oct 2003, Director General: NEFACOMP wrote: > I think the question is not very clear. > Do you want to delete from all the tables or you just want to delete from > one of the tables? > Does your MySQL version support sub-queries? (Is it Ver 4.1.x ?) > > I saw some replies to your question, did they solve your problem? > I am asking this because a DELETE command is one of the most risky > operations on data. > > > Thanks > Emery > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, October 13, 2003 17:25 > Subject: deleting rows which table1.row=table2.row > > > > how to delete rows which table1.field=table2.field -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: deleting rows which table1.row=table2.row
I think the question is not very clear. Do you want to delete from all the tables or you just want to delete from one of the tables? Does your MySQL version support sub-queries? (Is it Ver 4.1.x ?) I saw some replies to your question, did they solve your problem? I am asking this because a DELETE command is one of the most risky operations on data. Thanks Emery - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 13, 2003 17:25 Subject: deleting rows which table1.row=table2.row > how to delete rows which table1.field=table2.field > > thanks > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: deleting rows which table1.row=table2.row
[EMAIL PROTECTED] wrote: how to delete rows which table1.field=table2.field thanks delete t1 from t1,t2 where t1.field=t2.field at least, that's how I read the manual. Works for me. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: deleting rows which table1.row=table2.row
http://www.mysql.com/doc/en/DELETE.html and from that page: DELETE t1,t2 FROM t1,t2,t3 WHERE t1.id=t2.id AND t2.id=t3.id or DELETE FROM t1,t2 USING t1,t2,t3 WHERE t1.id=t2.id AND t2.id=t3.id In the above case we delete matching rows just from tables t1 and t2. >From MySQL 4.0, you can specify multiple tables in the DELETE statement to delete rows from one or more tables depending on a particular condition in multiple tables. However, you can not use ORDER BY or LIMIT in a multi-table DELETE. Hope that helps, Ken - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 13, 2003 11:25 AM Subject: deleting rows which table1.row=table2.row > how to delete rows which table1.field=table2.field > > thanks > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
deleting rows which table1.row=table2.row
how to delete rows which table1.field=table2.field thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]