Best way I can think of is by doing a select on table2 to get the value you
want and then delete from table1.
You could try
> delete from table1 where table1.somecol=table2.somecol and
table2.somecol2=somevalue and table1.somecol4=someothervalue
but I doubt it as it is not in the manual. If it is, someone please let me
know where as it is definitely not under 7.17 of the manual.
----- Original Message -----
From: "Øystein Selbekk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 3:21
Subject: Advanced delete SQL syntax
> Does anyone know the syntax for deleting records based on a join?
> This is what i do in Sybase ASE:
> delete table1 from table1,table2 where table1.somecol=table2.somecol and
table2.somecol2=somevalue and table1.somecol4=someothervalue
>
> Anyone got a clue?
>
> Thanks!
>
> regards Oystein Selbekk, Visbook AS
>
> ---------------------------------------------------------------------
> 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 <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php