check if record exists in join table


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. SELECT id,name FROM products WHERE EXISTS ( SELECT version_id FROM versionships WHERE products.id = versionships.version_id );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.