使用Python创建MySQL数据库
发布时间
阅读量:
阅读量
在搭建MySQL环境之前,需先完成pymysql库的安装操作
可通过执行 pip install pymysql 命令实现快速安装
MySQL常用操作指令
1、插入数据
opt = "insert into table_name(column1,column2,...,columnN)
values(value1,value2,...,valueN)"
cursor.execute(opt)
2、数据清除
opt = "delete from table_name where condition_statement"
cursor.execute(opt)
3、调整数据
opt = "update table_name set column1=value1,column2=value2,...,columnN=valueN where condition_statement"
cursor.execute(opt)
**4、数据查询
全部评论 (0)
还没有任何评论哟~
