freeCodeCamp/curriculum/challenges/chinese-traditional/08-data-analysis-with-python/data-analysis-with-python-c.../reading-data-from-databases.md

40 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 5e9a093a74c4063ca6f7c163
title: 從數據庫中讀取數據
challengeType: 11
videoId: MtgXS1MofRw
dashedName: reading-data-from-databases
---
# --description--
*在視頻中我們使用的編輯器工具是在 notebook.ai 這個平臺,你也可以選擇用其他的平臺,比如說 Google Colab 也是一個不錯的選擇。*
以下有更多的資料
- [在 GitHub 平臺的 Notebooks](https://github.com/ine-rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/tree/master/unit-1-reading-data-with-python-and-pandas/lesson-11-reading-data-from-relational-databases/files)
- [如何使用 Google Colab 來打開 GitHub 上的 Notebooks](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
`Cursor` 實例中都有什麼方法,這些方法能用來做什麼?
## --answers--
`Cursor` 實例中有方法 `.run()` ,它允許你運行 SQL 查詢語句。
---
`Cursor` 實例中有方法 `.select()` ,它允許你選擇記錄。
---
`Cursor` 實例有方法 `.execute()` 它能夠接收在數據庫中運行的 SQL 參數。
## --video-solution--
3