print "Error: unable to fecth data" # 關(guān)閉數(shù)據(jù)庫(kù)連接 db.close() 以上腳本執(zhí)行結(jié)果如下: fname=Mac, lname=Mohan, age=20, sex=M, income=2000 4、數(shù)據(jù)庫(kù)更新操作 更新操作用于更新數(shù)據(jù)表的的數(shù)據(jù),以下實(shí)例將 test表中的 SEX 字段全部修改為 'M',AGE 字段遞增1: ...
www.dbjr.com.cn/article/572...htm 2025-6-8