# Named query multiple DB

**URL:** <https://forum.inductiveautomation.com/t/named-query-multiple-db/53489>\
**Category:** Ignition\
**Created:** [November 26, 2021, 2:22pm UTC](https://forum.inductiveautomation.com/t/named-query-multiple-db/53489 "2021-11-26T14:22:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [November 26, 2021, 2:22pm UTC](https://forum.inductiveautomation.com/t/named-query-multiple-db/53489/1 "2021-11-26T14:22:01Z")

</div>

Would it be possible to do a named query with select from multiple database connection?

---

<div class="post-metadata">

**Author:** ![Brodie\_Everworks](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@Brodie\_Everworks](https://forum.inductiveautomation.com/u/Brodie_Everworks)\
**Post date:** [November 26, 2021, 3:49pm UTC](https://forum.inductiveautomation.com/t/named-query-multiple-db/53489/2 "2021-11-26T15:49:09Z")

</div>

I have not tried this out yet in Ignition but you should be able to this like:

SELECT database1.table1.field1,  
database2.table1.field1  
FROM database1.table1,  
database2.table1

and for more information this link should provide you with what you need:  
[https://www.navicat.com/en/company/aboutus/blog/1059-how-to-query-across-multiple-databases](https://www.navicat.com/en/company/aboutus/blog/1059-how-to-query-across-multiple-databases)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 26, 2021, 3:52pm UTC](https://forum.inductiveautomation.com/t/named-query-multiple-db/53489/3 "2021-11-26T15:52:20Z")

</div>

Not simultaneously, no. Individually, yes. (You can make a parameter that chooses the database connection at runtime.)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [November 26, 2021, 4:05pm UTC](https://forum.inductiveautomation.com/t/named-query-multiple-db/53489/4 "2021-11-26T16:05:51Z")

</div>

Hi @pturmel,

always the same that answer the questions 😉  
That's what i thought.  
Thx for the help
