We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insert
def insertRecords(db): cursor = db.cursor() try: cursor.execute('delete from persons') cursor.execute(''' insert into persons(id,name,age,address,salary) values(1,'Bill',32,'California',20000) ''') cursor.execute(''' insert into persons(id,name,age,address,salary) values(2,'Mike',30,'Texas',10000) ''') cursor.execute(''' insert into persons(id,name,age,address,salary) values(3,'John',45,'Norway',30000) ''') db.commit() return True except Exception as e: print(e) db.rollback() return False if insertRecords(db): print('成功插入记录') else: print('插入记录失败')
如何创建MySQL数据表 #74
The text was updated successfully, but these errors were encountered:
No branches or pull requests
insert
如何创建MySQL数据表 #74
The text was updated successfully, but these errors were encountered: