随笔分类 -  MySQL

摘要: 阅读全文 »
posted @ 2023-03-20 14:08 文采呱呱 阅读(9) 评论(0) 推荐(0) 编辑
摘要:查询数据库下面有多少个数据库 show databases; 阅读全文 »
posted @ 2023-03-20 14:02 文采呱呱 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 阅读全文 »
posted @ 2023-03-20 13:48 文采呱呱 阅读(7) 评论(0) 推荐(0) 编辑
摘要:初始化一个包记录项目文件 npm init -y 建立一个MySQL包 npm i mysql 配置mysql模块 // 导入数据库模块 const mysql = require('mysql') // 配置应用数据库 const db = mysql.createPool({ host: '12 阅读全文 »
posted @ 2022-11-09 00:06 文采呱呱 阅读(81) 评论(0) 推荐(0) 编辑
摘要:select count(*) from users where status = 0 as:select count(*) as sb from users where status = 0select usename as sb ,password as zz from users 阅读全文 »
posted @ 2022-11-08 00:28 文采呱呱 阅读(382) 评论(0) 推荐(0) 编辑
摘要:-- select * from users -- order by排序 -- desc降序 -- 升序 由小到大 -- 下列两条都是升序,其中asc加不加都可以,因为他们是等价的 -- select * from users order by status -- select * from use 阅读全文 »
posted @ 2022-11-08 00:24 文采呱呱 阅读(270) 评论(0) 推荐(0) 编辑
摘要:where语句的运算符 -- where子句的演示 -- 根据条件查询 -- select *from users where id >= 2 -- select * from users where id = 1 -- select * from users where usename !='李四 阅读全文 »
posted @ 2022-11-08 00:08 文采呱呱 阅读(41) 评论(0) 推荐(0) 编辑
摘要:增:通过insert into查询,列与值要一一对应通过insert into查询 insert into 表名(列,列) values ('值','值') insert into users(usename,password) values ('tony','123456') -- 删:delet 阅读全文 »
posted @ 2022-11-07 23:53 文采呱呱 阅读(21) 评论(0) 推荐(0) 编辑
摘要:MySQL的数据库下载地址 https://downloads.mysql.com/archives/installer/ 安装步骤: 点击execute检查依赖项 一直点next到这里的时候不用更改啥,也是点next 这里选择第二项 到这里之后。设置密码,然后点next 点击下一步自动配置 点击e 阅读全文 »
posted @ 2022-11-03 15:37 文采呱呱 阅读(20) 评论(0) 推荐(0) 编辑

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