We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27f3d0c commit 13d7cdfCopy full SHA for 13d7cdf
chapter1.md
@@ -28,4 +28,24 @@ conn.commit()
28
# 关闭连接
29
conn.close()
30
```
31
- # python连接oracle > 下载对应版本的cx_Oracle。具体步骤如下 > 1. 引用cx_Oracle 2. 连接数据库 3. 获取cursor 4. 使用cursor进行各种操作 5. 关闭cursor 6. 关闭连接 **例子如下:** ``` import cx_Oracle conn = cx_Oracle.connect('用户名/密码@主机/数据库') c = conn.cursor() x = c.execute('select * from test1') # 输出查询结果-->先进先出 x.fetchone() c.close() conn.close() ```
+# python连接oracle
32
+> 下载对应版本的cx_Oracle。具体步骤如下
33
+>
34
+1. 引用cx_Oracle
35
+2. 连接数据库
36
+3. 获取cursor
37
+4. 使用cursor进行各种操作
38
+5. 关闭cursor
39
+6. 关闭连接
40
+
41
+**例子如下:**
42
+```python
43
+import cx_Oracle
44
+conn = cx_Oracle.connect('用户名/密码@主机/数据库')
45
+c = conn.cursor()
46
+x = c.execute('select * from test1')
47
+# 输出查询结果-->先进先出
48
+x.fetchone()
49
+c.close()
50
+conn.close()
51
+```
0 commit comments