简体   繁体   中英

Accessing IntelliJ Database from Python

I am using IntelliJ for my Python project. I have created a database connection under Database where I can run queries with no problem. So I have a list of .sql files that I would like to run from within python using the existing connection. How do I go about it?

I can import various packages to pass the queries across to the external database, but since I already have this connection, I was wondering if it was possible to use it to pull data by simply just referring to the connection.

Thanks,

Rightclick on needed database in InteliJ Database tab and click on "Open Console". There you can paste your sql and run it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM