[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Delete on inner join?

Posted on 2007-10-03
1
Medium Priority
?
1,450 Views
Last Modified: 2012-05-05
Hello,
How do I join two tables together for a delete?

ie:

delete from table1
from table1 inner join table2
on table1.something = table2.something

or

delete from table1
from table1 inner join table2
one INSTR(table1.something,table2.something) > 0?


I tried both of these and neither worked. These queries work in SQL Server.

Worth 500 points.

Thanks,
Rick
0
Comment
Question by:richardsimnett
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 20011893
delete table1.*
from table1 , table2
where table1.something = table2.something


http://dev.mysql.com/doc/refman/5.0/en/delete.html
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month19 days, 17 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question