One of the main sources of efficiency in quicksort is locality of reference, where the computer hardware is optimized so that accessing memory locatio ...
分类:
编程语言 时间:
2020-05-26 18:36:35
阅读次数:
101
新增: 第一种方式: INSERT INTO 表名 VALUES(值1,值2,值3...); 第二种方式: INSERT INTO 表名 (列1,列2,列3...) VALUES(值1,值2,值3...); 注意:这里列与值要一一对应。 删除: DELETE FROM 表名 where 条件限定 注 ...
分类:
数据库 时间:
2020-05-26 15:28:10
阅读次数:
96
12.动态SQL if 常用:根据条件包含where子句的一部分 <select id="findActiveBlogLike" resultType="Blog"> SELECT * FROM BLOG WHERE state = ‘ACTIVE’ <if test="title != null" ...
分类:
数据库 时间:
2020-05-26 12:21:44
阅读次数:
61
一、子查询 含义:出现在其他语句中的select语句,称为子查询或内查询 分类:按子查询出现的位置: select后面:仅仅支持标量子查询 from后面:支持表子查询 where或having后面:标量子查询(单行)、列子查询(多行)、行子查询 exists后面(相关子查询):表子查询 按结果集的行 ...
分类:
数据库 时间:
2020-05-26 12:02:56
阅读次数:
108
查询统计图表的日期和数量,使用group by 分组查询: Select CONVERT(nvarchar(11),UpdateTime,120),count(1) from Log where UpdateTime >'2020-05-01' and UpdateTime < '2020-05-2 ...
分类:
数据库 时间:
2020-05-26 01:02:21
阅读次数:
143
1.定义三个变量:a.当前第几页数currentPage,b.显示多少条pageSize,c.总页数sumPage2.sql代码(select top pageSize * from 表 where Id not in (select currentPage*pageSize Id from 表 o ...
分类:
数据库 时间:
2020-05-25 22:32:28
阅读次数:
91
在项目中, 经常会碰到这样的场景, 要按 name list 获取这些name对应的记录, 比如要获取 KING,JONES,FORD 对应的记录, 显然想到的是使用 in 子句, 比如: select id from Employee where Emp_Name in ('KING','JONE ...
分类:
数据库 时间:
2020-05-25 22:19:54
阅读次数:
124
ZHS16GBK字符集格式下,varchar2(size) 可以存储 size/2个汉字 。也就是说varchar2(40)存储20个汉字。 分析如下: 1,首先 varchar2(size)释义: 可变长度的字符串,其最大长度为size个字节;size的最大值是4000,而最小值是1;你必须指定一 ...
分类:
数据库 时间:
2020-05-25 19:04:29
阅读次数:
119
xml中where中的查询 select * from a <where> <!-- 模糊查询 --> <if test="name" !=null || name != ""> and name like '%'||#{name}||'%' </if> <if test="age" !=null ...
分类:
其他好文 时间:
2020-05-25 17:23:33
阅读次数:
117
写的顺序:select ... from... where.... group by... having... order by..执行顺序:from... where...group by... having.... select ... order by... https://www.cnblo ...
分类:
数据库 时间:
2020-05-25 15:45:32
阅读次数:
55