-1
DELETE * 
FROM foo 
WHERE classid = SELECT classid 
                FROM market_items 
                WHERE steamid = '76561198089201925'

How can we then use this select query to delete all the rows in another table which have a classid as one of the selected class ids.

Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118
Semger
  • 253
  • 1
  • 4
  • 12
  • Please elaborate in your question. Do the query already solve something, are you getting an error or unwanted behaviour? Do steamID have a single classID or multiple classID ? – Juan Carlos Oropeza Jul 18 '15 at 23:58

1 Answers1

1
DELETE 
FROM foo 
where classid in (SELECT classid 
                  from market_items 
                  where steamid='76561198089201925')
Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118
Shreyas Chavan
  • 1,079
  • 1
  • 7
  • 17