以下のようなエラーが出る
load_ext sql
した場合
python
1File "<ipython-input-11-85ab4c6da765>", line 2 2 select * from test; 3 ^ 4SyntaxError: invalid syntax
pymysql
経由の場合
- 普通に使える
python
1import pymysql 2db = pymysql.connect( 3 host='localhost', 4 user='xxxxx', 5 password='xxxxx', 6 charset='utf8') 7stmt = db.cursor() 8sql = 'select * from db.tbl' 9stmt.execute(sql)
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/28 08:51
2017/06/28 08:51
2017/06/28 08:55
2017/06/28 09:00
2017/06/28 09:15 編集
2017/06/28 09:28
2017/06/30 07:38