# Ecto \`union\`

**URL:** <https://forum.elixirforum.com/t/ecto-union/4047>\
**Category:** Questions\
**Tags:** ecto\
**Created:** [March 8, 2017, 3:46pm UTC](https://forum.elixirforum.com/t/ecto-union/4047 "2017-03-08T15:46:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/32/2677_2.png) [@OvermindDL1](https://forum.elixirforum.com/u/OvermindDL1)\
**Post date:** [March 8, 2017, 3:46pm UTC](https://forum.elixirforum.com/t/ecto-union/4047/1 "2017-03-08T15:46:28Z")

</div>

I’m still not able to find any mention of `union` in the Ecto docs, how do people perform a SQL UNION in Ecto currently?

---

<div class="post-metadata">

**Author:** ![yurko](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/yurko/32/2369_2.png) [@yurko](https://forum.elixirforum.com/u/yurko)\
**Post date:** [March 8, 2017, 4:15pm UTC](https://forum.elixirforum.com/t/ecto-union/4047/2 "2017-03-08T16:15:49Z")

</div>

custom queries? [Question: SQL Union? · Issue #1233 · elixir-ecto/ecto · GitHub](https://github.com/elixir-ecto/ecto/issues/1233)

---

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/32/2677_2.png) [@OvermindDL1](https://forum.elixirforum.com/u/OvermindDL1)\
**Post date:** [March 8, 2017, 4:36pm UTC](https://forum.elixirforum.com/t/ecto-union/4047/3 "2017-03-08T16:36:38Z")

</div>

I already know about custom queries, but I really hate losing the type safety that ecto affords, was wondering if there was a type-safe method. 😉

---

<div class="post-metadata">

**Author:** ![yurko](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/yurko/32/2369_2.png) [@yurko](https://forum.elixirforum.com/u/yurko)\
**Post date:** [March 8, 2017, 4:49pm UTC](https://forum.elixirforum.com/t/ecto-union/4047/4 "2017-03-08T16:49:28Z")

</div>

yep I’ve then seen your ticket [UNION/INTERSECT/EXCEPT support · Issue #1549 · elixir-ecto/ecto · GitHub](https://github.com/elixir-ecto/ecto/issues/1549)

someone might share the current state of things there but there seem to be no other way at the moment
