• I am creating a new home page for this site, where the focus will be on directing people to the forums. If you would like to provide a testimonial, I would be most grateful. The thread where this is discussed can be found here: Seeking Testimonials Alternatively, just private message me.

Delete Query Inner Join (1 Viewer)

Sreedevi

Registered User.
Local time
Today, 02:38
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, 10:38
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, 02:38
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