Hi All!
I have a problem deleting from a table and using another as reference. I
use a query like:
DELETE tableA
FROM tableB
WHERE tableA.idB = tableB.id
AND tableA.data1=<VALUE>
AND tableB.data2=<VALUE>
(I'm using MySQL 4.0.12 on Red Hat 8 - Note: <VALUE> are integer values)
What I want to do is delete some rows from tableA (which is a detail
table for tableB) meeting some criteria (tableA.data1=VALUE) and with some
value also in tableB.
From the documentation, this is a correct DELETE statement, however, I
get the following error:
"Not unique table/alias: 'tableA'"
As I understand, this error says that I cannot delete from tableA if I
use it in the WHERE clause. But I need to list it in the where clause so
that I can do the master/detail relationship. How can I do that?
Please note that I use MySQL 4.0.12, so I cannot use the DELETE ...
USING ... syntax which were added in 4.0.2
Cheers,
Jose Miguel.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]