您好,登錄后才能下訂單哦!
下面一起來了解下pymysql.err.Internal報107錯誤,相信大家看完肯定會受益匪淺,文字在精不在多,希望pymysql.err.Internal報107錯誤這篇短內(nèi)容是你想要的。
python中使用pymysql創(chuàng)建table是報錯是上面標(biāo)題,sql語句如下:
sql = '''
create table music (
id int not null auto_increment,
song text,
singer text,
genre text,
issue text,
publisher text,
score text)'''
百度,問題是:自增字段必須是主鍵。解決辦法是設(shè)置id為主鍵。
修改后sql為:
sql = '''
create table music (
id int not null auto_increment,
song text,
singer text,
genre text,
issue text,
publisher text,
score text,
primary key(id)
)'''
看完pymysql.err.Internal報107錯誤這篇文章后,很多讀者朋友肯定會想要了解更多的相關(guān)內(nèi)容,如需獲取更多的行業(yè)信息,可以關(guān)注我們的行業(yè)資訊欄目。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。