Skip to content
Advertisement

Tag: ecto

How to write SQL for combination of AND?

Please check the attached table. I need to write a query to get documents which have both tage_id of say 32 and 26. Something like select * from doc_tags where tag_id = 32 or tag_id = 26 is not going to work as I will get both documents with 32, 26, and ( 32, 26 ). I need documents which

Advertisement