K
Kyselyโ€ข2y ago
ohmi

Cross database joins in MySQL

Hi all, Is it possible to do joins across databases within the same MySQL instance? i.e
SELECT * FROM db1.table1 INNER JOIN db2.table2 ON db1.table1.id = db2.table2.id
SELECT * FROM db1.table1 INNER JOIN db2.table2 ON db1.table1.id = db2.table2.id
I've generated the typings for both databases, but not sure if there's a way to leverage them?
6 Replies
ohmi
ohmiโ€ข2y ago
GitHub
kysely/schemas.md at master ยท kysely-org/kysely
A type-safe typescript SQL query builder. Contribute to kysely-org/kysely development by creating an account on GitHub.
Igal
Igalโ€ข2y ago
Hey ๐Ÿ‘‹๐Ÿป I thought I pointed that schemas might work here in another thread.. ๐Ÿ˜• Glad you found the answer!
ohmi
ohmiโ€ข2y ago
i may have potentially overlooked that, because i wasnt aware of what 'schemas' in pg were ๐Ÿ˜… . ended up ctrl f'ing through this server for 'multiple database' and found the same thing. hopefully this thread also helps with the discoverability for future mysql people
Unknown User
Unknown Userโ€ข8mo ago
Message Not Public
Sign In & Join Server To View
Igal
Igalโ€ข8mo ago
Hey ๐Ÿ‘‹ This is tracked over at: https://github.com/kysely-org/kysely/issues/875
GitHub
Ms sql server - database / schema / tablename ยท Issue #875 ยท kysely...
Good morning, I work with Sql server on several databases. When I do a select it is common for me to join tables between several databases. Is there a way on Kysely to specify the database/schema/t...
Unknown User
Unknown Userโ€ข8mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server