diff --git "a/01 \351\231\210\346\242\246\346\242\246/20231023.md" "b/01 \351\231\210\346\242\246\346\242\246/20231013.md" similarity index 100% rename from "01 \351\231\210\346\242\246\346\242\246/20231023.md" rename to "01 \351\231\210\346\242\246\346\242\246/20231013.md" diff --git "a/01 \351\231\210\346\242\246\346\242\246/20231019.md" "b/01 \351\231\210\346\242\246\346\242\246/20231019.md" new file mode 100644 index 0000000000000000000000000000000000000000..49e66a2069ecbf150614b7e053804c73bcd8ff0a --- /dev/null +++ "b/01 \351\231\210\346\242\246\346\242\246/20231019.md" @@ -0,0 +1,119 @@ +##### 笔记 + +```mysql +索引 +1.普通索引 +create index 索引名 on 表名(列名); +2.唯一索引 +3.主键索引 +4.联合索引 +``` + + + +##### 作业 + +```mysql +drop database if exists zy; +create database zy charset utf8; +use zy; +-- -- 建立一个数据和表(id,name,phone,sex,hobby),想办法插入10万条数据, +create table abc( +id int primary key, +name varchar(20), +phone varchar(20), +sex char(1), +hobby varchar(20) +); + + +delimiter // +create procedure prc_zy(in n int) +begin +declare sex char(1); +declare hobby varchar(20); +declare return_str varchar(20); +declare `name` varchar(20); +declare i int default 1; + while i0b9fb2d73e5f7a9b15f065d33bb6982.png + +![e7eb1a63d6b7eefb29d81f4cae6d429.png](https://s2.loli.net/2023/10/19/TKqxvI39YnRFmVa.png)