SIDN,ODD这几个常用函数的导数函数是是什么意思

Access denied | www.wenjiangeshi.cn used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (www.wenjiangeshi.cn) has banned your access based on your browser's signature (4123ebc-ua98).mybatis性能优化二之多对多查询:用一次请求解决n次请求查询
mybatis性能优化二之多对多查询:用一次请求解决n次请求查询
&resultMap type="com.cn.vo.Teacher" id="teacher"&
&id property="id" column="id" javaType="int" jdbcType="INTEGER" /&
&result property="name" column="name" javaType="string"
jdbcType="VARCHAR" /&
&collection property="students" column="t_s_id" ofType="com.cn.vo.Student"&
&id property="sid" column="sid" javaType="int" jdbcType="INTEGER" /&
&result property="sname" column="sname" javaType="string"
jdbcType="VARCHAR" /&
&/collection& --&
&collection property="students" resultMap="studentResultMap" /&
&collection property="goods" resultMap="goodsResultMap" /&
&/resultMap&
&resultMap type="com.cn.vo.Student" id="studentResultMap"&
&id property="sid" column="sid" javaType="int" jdbcType="INTEGER" /&
&result property="sname" column="sname" javaType="string" jdbcType="VARCHAR" /&
&/resultMap&
&resultMap type="com.cn.vo.GoodItem" id="goodsResultMap"&
&id property="gid" column="gid" javaType="int" jdbcType="INTEGER" /&
&result property="goodName" column="goodName" javaType="string" jdbcType="VARCHAR" /&
&result property="price" column="price" javaType="float" jdbcType="FLOAT" /&
&result property="good_sid" column="good_sid" javaType="int" jdbcType="INTEGER" /&
&/resultMap&
&select id="one2many" parameterType="int" resultMap="teacher"&
&!-- select
t.id,t.name,s.t_s_id,s.sid,s.sname
from teacher t
left join student s on t.id = s.t_s_id
left join goodItem g on g.good_sid=s.t_s_id
where t.id = #{id}
t.id,t.name,s.t_s_id,s.sid,s.sname,g.gid,g.goodname,g.price,g.good_sid
from teacher t
left join student s on
t.id = s.t_s_id
left join goodItem g on
g.good_sid = s.sid
where t.id = #{id}
以上是优化的结论:用一次请求解决n次请求查询
题目:在teacher 表中找到该 teacher下面的n个student并找出n个学生每个学生有多少个goods。
CREATE TABLE
name varchar(100) DEFAULT NULL,
PRIMARY KEY (id)
CREATE TABLE
sid number
sname varchar(100) DEFAULT NULL,
t_s_id number
PRIMARY KEY (sid)
insert into teacher(id,name) values(111,'zhangsan');
insert into teacher(id,name) values(222,'lisi');
insert into student(sid,sname,t_s_id) values(1,'xs1',111);
insert into student(sid,sname,t_s_id) values(2,'xs2',111);
insert into student(sid,sname,t_s_id) values(3,'xs3',222);
insert into student(sid,sname,t_s_id) values(4,'xs4',111);
select t.id,t.name,s.t_s_id,s.sid,s.sname
from teacher t
left join student s
on t.id = s.t_s_id where t.id = 111
create table goodItem(
gid number not null,
goodName varchar(10),
price float,
good_sid number
insert into goodItem(gid,Goodname,Price,Good_Sid)
values(1,'iphone6','6000',2);
insert into goodItem(gid,Goodname,Price,Good_Sid)
values(2,'iphone5','5000',2);
insert into goodItem(gid,Goodname,Price,Good_Sid)
values(3,'iphone4','4000',2);
insert into goodItem(gid,Goodname,Price,Good_Sid)
values(4,'iphone3','3000',1);
package com.cn.
public class Student {
public int getSid() {
public void setSid(int sid) {
this.sid =
public String getSname() {
public void setSname(String sname) {
this.sname =
package com.cn.
import java.util.L
public class Teacher {
private List&Student&
private List&GoodItem&
public List&GoodItem& getGoods() {
public void setGoods(List&GoodItem& goods) {
this.goods =
public int getId() {
public void setId(int id) {
public String getName() {
public void setName(String name) {
this.name =
public List&Student& getStudents() {
public void setStudents(List&Student& students) {
this.students =
package com.cn.
public class Item {
private String goodN
private Integer good_
public Integer getGid() {
public void setGid(Integer gid) {
this.gid =
public String getGoodName() {
return goodN
public void setGoodName(String goodName) {
this.goodName = goodN
public float getPrice() {
public void setPrice(float price) {
this.price =
public Integer getGood_sid() {
return good_
public void setGood_sid(Integer good_sid) {
this.good_sid = good_
package com.cn.
import java.util.L
public class GoodItem extends Item{
/* private List&Student&
private List&Teacher&
public List&Student& getStudents() {
public void setStudents(List&Student& students) {
this.students =
public List&Teacher& getTeachers() {
public void setTeachers(List&Teacher& teachers) {
this.teachers =
用云栖社区APP,舒服~
【云栖快讯】新手小白必看!编程语言系列讲座火爆进行中,与行业资深专家一起学习Python、C++、JavaScript、Java!从入门到进阶&&
针对日志类数据的一站式服务,用户无需开发就能快捷完成数据采集、消费、投递以及查询分析等功能,...
操作审计(ActionTrail)会记录您的云账户资源操作,提供操作记录查询,并可以将记录文...
云数据库SQL Server,具有企业许可授权,权限更为开放,引擎功能更为强大。能完美支持W...
为您提供简单高效、处理能力可弹性伸缩的计算服务,帮助您快速构建更稳定、安全的应用,提升运维效...
云通信517活动没有更多推荐了,
不良信息举报
举报内容:
Select 查询 自增序列生成
举报原因:
原文地址:
原因补充:
最多只允许输入30个字
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!

我要回帖

更多关于 几个特殊的奇函数 的文章

 

随机推荐