随笔分类 -  mysql

mysql相关
摘要:#创建数据库并应用create database shopdb;use shopdb;#创建表customerscreate table customers(c_id int primary key auto_increment,c_name varchar(20),c_age tinyint un 阅读全文
posted @ 2020-02-12 19:32 火狐python 阅读(175) 评论(0) 推荐(0)
摘要:示例及练习1-MOSHOU.hero.txtcreate database MOSHOU;use MOSHOU;create table hero(id int,name char(15),sex enum("男","女"),country char(10));insert into hero va 阅读全文
posted @ 2020-02-12 19:30 火狐python 阅读(284) 评论(0) 推荐(0)
摘要:from pymysql import *class my_mysql_mud(object): def __init__(self,host,port,db,user,passwd,charset="utf8"): self.host = host self.port = port self.db 阅读全文
posted @ 2020-02-12 19:29 火狐python 阅读(164) 评论(0) 推荐(0)
摘要:python数据库编程 1.pyshon数据库接口(python DB-API) 1.为开发人员提供的数据库应用编程接口 2.python支持的数据库服务软件 mysql,oracle,sql_server,mongodb.... 3.python提供的操作mysql模块 python3:pymys 阅读全文
posted @ 2020-02-12 19:26 火狐python 阅读(138) 评论(0) 推荐(0)
摘要:1.数据导入 1.作用:把文件系统的内容导入到数据库中 2.语法 load data infile "绝对路径" into table 表名 fields terminated by "分隔符" lines terminated by "\n"; 4.操作步骤 1.在数据库中创建对应的表 2.将要导 阅读全文
posted @ 2020-02-12 19:25 火狐python 阅读(268) 评论(0) 推荐(0)
摘要:1.数据库软件: MySQL SQL_Server Oracle Mariadb DB2 MongoDB2.MySQL特点 1.关系型数据库 1.关系型数据库的特点 1.数据是以行和列的形式去存储的 2.这一系列的行和列称为表 3.表中的每一横行叫一条记录 4.表中的每一竖列叫一个字段 5.表和表之 阅读全文
posted @ 2020-02-12 19:24 火狐python 阅读(231) 评论(0) 推荐(0)