上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 26 下一页
摘要: 数组排序 1. 数组排序(从小到大排序) import java.util.Arrays; public class Test01 { public static void main(String[] args){ // 数组(从小到大排序) // 1.第一种方法 Integer[] arr1 = 阅读全文
posted @ 2023-12-18 15:28 马铃薯1 阅读(854) 评论(0) 推荐(0)
摘要: Java 字符串、数组、ArrayList之间的相互转换 1. 数组转字符串 import java.util.Arrays; public class Test02 { public static void main(String[] args){ String[] scores1 = new S 阅读全文
posted @ 2023-12-16 11:31 马铃薯1 阅读(586) 评论(0) 推荐(0)
摘要: 安装城市数据 npm install element-china-area-data -S 导入数据 import { regionData, codeToText } from 'element-china-area-data' 1. 显示全部城市 HTML代码: <template #equip 阅读全文
posted @ 2023-12-13 13:50 马铃薯1 阅读(2703) 评论(0) 推荐(0)
摘要: 思考题: 第一个SQL语句效率要更高,这是因为 id 是通过聚集索引查询的,只需要一次查询就可以差点对应的数据。而第二个SQL语句是通过二级索引查询的,首先要根据 name 查询到对应的 主键id,然后根据 id 再回表查询对应的数据。因此,哪怕 id 和 name 都有索引,也是 id 的聚集索引 阅读全文
posted @ 2023-12-13 11:26 马铃薯1 阅读(33) 评论(0) 推荐(0)
摘要: MySQL with Recursive是一种基于递归思想的MySQL查询方式,可以实现对数据的递归查询和处理,返回符合条件的数据,在MySQL 8.0版本中,该功能被正式引入。 MySQL with Recursive有什么作用 MySQL with Recursive的作用是基于一组初始数据,进 阅读全文
posted @ 2023-12-11 17:46 马铃薯1 阅读(8629) 评论(0) 推荐(1)
摘要: 可以看到,上面的例子上,无索引的情况会查找全部的10次得到最终的结果,而有索引的情况会通过二叉排序树的数据结构,只需通过三次的查找就能得到最终的结果,更加的高效。 (这里需要注意,上述二叉树索引结构只是一个示意图,并不是真实的索引结构) 在了解索引的数据结构之前,我们先熟悉以下的数据结构: 1. 二 阅读全文
posted @ 2023-12-11 16:38 马铃薯1 阅读(65) 评论(0) 推荐(0)
摘要: 注意:数据库中经常会用到的索引就在引擎层 案例:创建 账户表(熟悉存储引擎) CREATE TABLE account( id int auto_increment primary key comment "主键ID", name varchar(10) comment "姓名", money in 阅读全文
posted @ 2023-12-09 10:30 马铃薯1 阅读(47) 评论(0) 推荐(0)
摘要: 事务简介 案例:创建 账户表(熟悉事务操作) CREATE TABLE account( id int auto_increment primary key comment "主键ID", name varchar(10) comment "姓名", money int comment "余额" ) 阅读全文
posted @ 2023-12-08 17:19 马铃薯1 阅读(46) 评论(0) 推荐(0)
摘要: 子查询 案例:创建部门表 和 员工表(熟悉子查询) -- 部门表 CREATE TABLE dept( id int auto_increment comment "ID" primary key , name varchar(50) not null comment "部门名称" )comment 阅读全文
posted @ 2023-12-07 11:57 马铃薯1 阅读(172) 评论(0) 推荐(0)
摘要: 联合查询 对于union查询,就是把多次查询的结果合并起来,形成一个新的查询结果集 案例:创建部门表 和 员工表(熟悉联合查询) -- 部门表 CREATE TABLE dept( id int auto_increment comment "ID" primary key , name varch 阅读全文
posted @ 2023-12-07 11:32 马铃薯1 阅读(270) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 26 下一页