New to Python -- Help with SQL Server Connection?
Hi, I am new to Python and PyCharm, and I am interested in accessing data that I have currently stored in SQL Server.
I've established a JDBC connection through the GUI and my server is connected. I can directly manipulate the data through the Database Console.
How do I access the data from my Python code? I am having trouble finding the syntax for loading tables in local objects or even how to refer to them.
Thanks!!
I've established a JDBC connection through the GUI and my server is connected. I can directly manipulate the data through the Database Console.
How do I access the data from my Python code? I am having trouble finding the syntax for loading tables in local objects or even how to refer to them.
Thanks!!
请先登录再写评论。
If you are talking specifically about Microsoft SQL Server, this page may help:
https://wiki.python.org/moin/SQL%20Server
If you want to use an ORM, SQLAlchemy is probably the best choice.
http://docs.sqlalchemy.org/en/rel_0_9/dialects/mssql.html
It seems like if I use SQLAlchemy there is no benefit in using PyCharm's built in database connection tool.