随笔分类 -  02:MySQL数据库 / 01-数据库基础

摘要:一、视图 1、什么是视图 视图就是通过查询得到一张虚拟表,然后保存下来,下次直接使用即可 2、为什么要用视图 如果要频繁使用一张虚拟表,可以不用重复查询 3、如何使用视图 create view teacher2course as select * from teacher inner join c 阅读全文
posted @ 2022-03-05 17:18 三三得九86 阅读(22) 评论(0) 推荐(0) 编辑
摘要:1、下载模块 pip3 install pymysql """ python默认下载模块的地址是国外的网站 速度有时候会非常的慢 如果想要提升速度我们可以切换下载源 """ (1)阿里云 http://mirrors.aliyun.com/pypi/simple/ (2)豆瓣http://pypi. 阅读全文
posted @ 2022-03-05 16:44 三三得九86 阅读(24) 评论(0) 推荐(0) 编辑
摘要:一、查询关键字 1、where # 1.查询id大于等于3小于等于6的数据 select id,name from emp where id >= 3 and id <= 6; select * from emp where id between 3 and 6; # 2.查询薪资是20000或者1 阅读全文
posted @ 2022-03-03 23:33 三三得九86 阅读(326) 评论(0) 推荐(0) 编辑
摘要:一、约束条件 # 1. unsigned 无符号 create table t1 (id int unsigned); # 2. zerofill 用0填充 create table t2 (id int zerofill); insert into t2 values (1); insert in 阅读全文
posted @ 2022-03-02 19:46 三三得九86 阅读(29) 评论(0) 推荐(0) 编辑
摘要:一、基本SQL语句 1、创建表的完整结构 create table 表名 ( 字段名1 数据类型 约束条件 约束条件 约束条件, 字段名2 数据类型 约束条件 约束条件 约束条件, 字段名3 数据类型 约束条件 约束条件 约束条件, 字段名4 数据类型 约束条件 约束条件 约束条件 ); 注意事项: 阅读全文
posted @ 2022-03-01 16:28 三三得九86 阅读(73) 评论(0) 推荐(0) 编辑
摘要:置顶总结 # 常用命令 net start mysql # 开启服务 需要管理员模式 net stop mysql # 关闭服务 需要管理员模式 mysql # 游客模式进入 mysql -u root -p # 最高权限进入 需要输入密码 一、数据库概念和分类 1、概念 数据库:用来存储数据,方便 阅读全文
posted @ 2022-03-01 09:25 三三得九86 阅读(43) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示