Mysql基础安装1https://downloads.mysql.com/archives/community/
初始化12"D:安装目录\bin\mysqld.exe" --initialize-insecure#会创建一个初始化root账户(无密码)
配置文件123456789101112131415在安装目录创建my.ini内容:[mysqld]# port 端口port = 3306#set basedir to your installation path安装目录basedir = D:\\EXE\\mysql-5.7.31-winx64#set dat
2023-08-041.4k 字6 分钟
Mysql进阶
Mysql进阶必备sql语句123456789101112131415161718select * from info where id between 2 and 4; -- id大于等于2、且小于等于4select * from info where id in (1,4,6); -- 查询id为1或4或6的数据select * from info where id in (select id from depart); -- 查询info表中 id为在depart表中id列的数据(条件搜索只能写一列)-- 当exists后面的条件成立就执行前面的查询,如果不成立则不查询select *