1. 程式人生 > >關於PyCharm 中使用sqlite建立資料庫表,表不顯示的問題。

關於PyCharm 中使用sqlite建立資料庫表,表不顯示的問題。

1.問題:

在pycharm中將爬取的資料通過sqlite3儲存在資料庫表中,資料庫名稱為:film.sqlite3,建立表名為:filmtop250。過程為

import sqlite3
film = sqlite3.connect('film.sqlite3')
create_table = 'create table filmtop250(rank integer,title varchar(256),rate float,author varchar(256),member varchar(256),quote varchar(256))'
film.execute(create_table)
exit()

此時,Database只顯示資料庫film,但並沒有建立的表。

2.解決方案: