Delete Query Inner Join (1 Viewer)

Sreedevi

Registered User.
Local time
Today, 08:03
Joined
Oct 10, 2007
Messages
22
Hi,

I am very bad in queries and need your help on this one.

I am trying to run a simple delete query having an inner join but it gives an error every time. The error being
"Specify the table containing the records you want to delete"

here are the details of the simulated table and the query than I am trying to run

table1 :
name number
abc 1
xyz 2

table2
name city
abc A

Query that I am trying to run is:
Delete Table1 from Table1 INNER JOIN Table2 on Table1.name = Table2.name;

Thanks
 
Last edited:

Jon K

Registered User.
Local time
Today, 16:03
Joined
May 22, 2002
Messages
2,209
Try this.

DELETE DISTINCTROW Table1.*
FROM Table1 INNER JOIN Table2 ON Table1.Name=Table2.Name;
.
 

Sreedevi

Registered User.
Local time
Today, 08:03
Joined
Oct 10, 2007
Messages
22
Thanks Jon,

It worked, but just out of curiosity why does having a DISTINCTROW makes it working.


Thanks
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom