Skip to content

Commit 3f526f0

Browse files
authored
Update Python连接数据库操作.md
1 parent 0436f4e commit 3f526f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

studynotes/Python连接数据库操作.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Python连接数据库操作
2-
## 连接mysql
2+
## 一、连接mysql
33
### 方式一
44

55
# 创建数据库连接
@@ -64,7 +64,7 @@
6464
print(data)
6565
conn.close()
6666

67-
## 连接oracal
67+
## 二、连接oracal
6868
* 1、下载安装cx_Oracle https://pypi.org/project/cx-Oracle/#files
6969
* 2、下载instantclient,配置环境变量。 https://www.oracle.com/technetwork/cn/topics/winx64soft-101515-zhs.html
7070
* 3、 把instantclient文件夹下所有的ddl文件复制到anaconda文件夹下。(复制oci,oraocci11,oraociei11的3个DLL粘贴到你的PY目录的Libs/site-packages文件夹下面)
@@ -88,7 +88,7 @@
8888
scan_result = res.fetchall()
8989
conn.close()
9090

91-
## 连接sqlite
91+
## 三、连接sqlite
9292
sqlite数据库可以当做缓存来用,如果不想用redis的话,可以考虑用sqlite
9393

9494
import sqlite3

0 commit comments

Comments
 (0)