数据库系统概论(超详解!!!) 第三节 关系数据库标准语言SQL(Ⅳ)

news2024/10/6 20:37:10

1.集合查询

集合操作的种类

并操作UNION

交操作INTERSECT

差操作EXCEPT

参加集合操作的各查询结果的列数必须相同;对应项的数据类型也必须相同

查询计算机科学系的学生及年龄不大于19岁的学生。
        SELECT *
        FROM Student
        WHERE Sdept= 'CS'
        UNION
        SELECT *
        FROM Student
        WHERE Sage<=19;

UNION:将多个查询结果合并起来时,系统自动去掉重复元组

UNION ALL:将多个查询结果合并起来时,保留重复元组

查询选修了课程1或者选修了课程2的学生。

        SELECT Sno
        FROM SC
        WHERE Cno=' 1 '
        UNION
        SELECT Sno
        FROM SC
        WHERE Cno= ' 2 ';

查询计算机科学系的学生与年龄不大于19岁的学生的交集。

SELECT *
FROM Student
WHERE Sdept='CS' 
INTERSECT
SELECT *
FROM Student
WHERE Sage<=19 

实际上就是查询计算机科学系中年龄不大于19岁的学生。

		SELECT *
        	FROM Student
        	WHERE Sdept= 'CS' AND  Sage<=19;

查询既选修了课程1又选修了课程2的学生。
    
	 SELECT Sno
    FROM SC
    WHERE Cno=' 1 ' 
    INTERSECT
    SELECT Sno
    FROM SC
    WHERE Cno='2 ';

也可以表示为:
        
	     SELECT Sno
          FROM    SC
          WHERE Cno=' 1 ' AND Sno IN
                                                (SELECT Sno
                                                 FROM SC
                                                 WHERE Cno=' 2 ');

查询计算机科学系的学生与年龄不大于19岁的学生的差集。

    SELECT *
    FROM Student
    WHERE Sdept='CS'
    EXCEPT
    SELECT  *
    FROM Student
    WHERE Sage <=19;


实际上是查询计算机科学系中年龄大于19岁的学生

        SELECT *
        FROM Student
        WHERE Sdept= 'CS' AND  Sage>19;

2.于派生表的查询

子查询不仅可以出现在WHERE子句中,还可以出现在FROM子句中。

这时子查询生成的临时派生表(Derived Table)成为主查询的查询对象

找出每个学生超过他自己选修课程平均成绩的课程号
     
    SELECT Sno, Cno
    FROM SC, (SELECTSno, Avg(Grade) 
                        FROM SC
    			  GROUP BY Sno)
                        AS   Avg_sc(avg_sno,avg_grade)
    WHERE SC.Sno = Avg_sc.avg_sno
                   and SC.Grade >=Avg_sc.avg_grade

如果子查询中没有聚集函数,派生表可以不指定属性列,子查询SELECT子句后面的列名为其缺省属性。

查询所有选修了1号课程的学生姓名,可以用如下查询完成:
    SELECT Sname
    FROM     Student,  
                   (SELECT Sno FROM SC 
                    WHERE Cno='  1 ') AS SC1
    WHERE  Student.Sno=SC1.Sno;

3.Select语句的一般形式

SELECT [ALL|DISTINCT]      

<目标列表达式> [别名] [ ,<目标列表达式> [别名]] …  

FROM     <表名或视图名> [别名]                

[ ,<表名或视图名> [别名]] …                

|(<SELECT语句>)[AS]<别名>  

[WHERE <条件表达式>]  

[GROUP BY <列名1>[HAVING<条件表达式>]]

 [ORDER BY <列名2> [ASC|DESC]];

1. 目标列表达式的可选格式

目标列表达式格式

(1) *

(2) <表名>.*

(3) COUNT([DISTINCT|ALL]* )

(4) [<表名>.]<属性列名表达式>[,<表名>.]<属性列名表达式>]…     

其中<属性列名表达式>可以是由属性列、作用于属性列 的聚集函数和常量的任意算术运算(+,-,*,/)组成的 运算公式

2. 聚集函数的一般格式

3. WHERE子句的条件表达式的可选格式

4.练习

/*(1)查询选修了81003号课程的学生姓名;*/
       /*方法1:连接查询*/
       select sname
       from Student,SC
       where Student.Sno=SC.Sno and SC.Cno='81003';
       /*方法2:嵌套in*/
       select sname
       from Student 
       where Sno in (select Sno
                     from SC
                     where Cno='81003');
       /*方法3:嵌套exists*/
       select sname
       from Student 
       where exists (select *
                     from SC
                     where Sno=Student.Sno and Cno='81003');

/*(2)查询选修了学分为3的课程的学生学号和姓名;*/
       /*方法1:连接查询*/
       select Student.Sno ,student.sname
       from Student,SC,Course
       where Student.Sno=SC.Sno and SC.Cno=Course.Cno and Ccredit='3';
       
       /*方法2:嵌套in*/
       select Sno ,sname
       from Student 
       where Sno in (select Sno
                     from SC
                     where Cno in (select Cno
                                   from Course
                                   where Ccredit='3'));

/*(3)找出每个超过其所在专业平均年龄的学号,姓名和年龄*/
       /*方法1:嵌套相关查询*/
       select sno,sname,YEAR(GETDATE())-YEAR(sbirthdate)as'年龄'
       from Student
       where YEAR(GETDATE())-YEAR(sbirthdate)> any(select AVG(YEAR(GETDATE())-YEAR(sbirthdate))
                                                 from Student
                                                group by Smajor);
       
       /*方法2:派生表*/
	   select distinct sno,sname,YEAR(GETDATE())-YEAR(sbirthdate)as'年龄'
       from Student x,(select AVG(YEAR(GETDATE())-YEAR(sbirthdate))
	                 from Student y
					 group by y.Smajor) as avg_sex(sex)
	   where YEAR(GETDATE())-YEAR(sbirthdate)>avg_sex.sex;

       
/*(4)查询学分大于“操作系统”的所有课程名称;*/
       /*方法1:嵌套>*/
       select Cname
       from Course 
       where Ccredit >(select Ccredit
                     from Course
                     where Cname='操作系统');

       /*方法2:嵌套exists*/
       select Cname
       from Course x
       where exists(select *
                     from Course y
                     where x.Ccredit>y.Ccredit and y.Cname='操作系统');

/*(5)查询没有选“数据库”的学生学号;*/
       /*方法1:嵌套exists*/
	   select distinct Sno
       from SC x 
       where  not exists(select *
	                     from SC y
                         where y.Sno=x.Sno and exists(select * 
						                              from Course
                                                      where Cno=y.Cno and Cname='数据库系统概论') );
       /*方法2:集合差*/
	   select distinct sno
	   from SC
	   except
	   select Sno
	   from Course,SC
	   where Course.Cno=SC.Cno and Cname='数据库系统概论';
       /*方法3:not in*/
	   select distinct Sno
       from SC 
       where Sno not in (select Sno
	                     from SC 
                         where Cno  in (select Cno 
						                from Course
                                        where Cname='数据库系统概论') );

/*(6)查询与“数据库”、“数学”学分不同的所有课程名称;*/
       /*方法1:not in*/
	   select Cname
       from Course 
       where Ccredit not in (select Ccredit
	                         from Course 
                             where Cname in (select Cname 
						                     from Course
                                             where Cname in('数据库系统概论','离散数学') ));

       /*方法3:<> all或者any*/
       select Cname
       from Course 
       where Ccredit <> any(select Ccredit
	                        from Course 
                            where Cname in (select Cname 
						                     from Course
                                             where Cname in('数据库系统概论','离散数学') ));	   

/*(7)查询平均分大于等于80分的所有课程号和课程名称;*/
       /*方法1:连接查询*/
       select Course.Cno,Cname
       from Course,SC
	   where Course.Cno=SC.Cno
	   group by Course.Cno,Cname
	   having AVG(Grade)>='80';

       /*方法2:派生表*/
       select Course.Cno,Cname
       from Course,(select cno
	                   from SC
					   group by Cno
					   having AVG(Grade)>='80')as avg_sc(avg_cno)
	   where Course.Cno=avg_sc.avg_cno
	   group by Course.Cno,Cname

/*(8)查询同时选修了‘81001’和‘81002’号课程的学生学号和姓名;*/
      /*方法1:自身连接*/
	  select student.Sno,Sname
	  from Student ,SC s1,SC s2
	  where Student.Sno=s1.Sno and s1.Sno=s2.Sno and s1.Cno='81001' and s2.Cno='81002'
	  group by Student.Sno,Sname;

	  /*方法2:嵌套in*/
	  select Sno,Sname
	  from Student 
	  where Sno in (select Sno
	                from SC
					where Cno = '81001'and Sno in (select Sno
	                                              from SC
					                              where Cno='81002'));

	  /*方法3:集合*/
	  select student.Sno,Sname
	  from Student ,SC 
	  where Student.Sno=sc.Sno and Cno='81001' 
	  INTERSECT
	  select student.Sno,Sname
	  from Student ,SC 
	  where Student.Sno=SC.Sno and  Cno='81002';

/*(9)查询同时选修了‘数据库系统概论’和‘数据结构’的学生学号和姓名;*/
      /*方法1:嵌套in*/
	  select Sno,Sname
	  from Student 
	  where Sno in (select Sno
	                from SC
					where Cno in (select Cno
	                              from Course
					              where Cname = '数据库系统概论') and Sno in (select Sno
	                                                                          from SC
					                                                          where Cno in (select Cno
	                                                                          from Course
					                                                          where Cname='数据结构')));

	  /*方法2:集合*/
	  select Student.Sno,Sname
	  from Student,(select Sno
	                from SC
					where Cno in (select Cno
	                              from Course
					              where Cname = '数据库系统概论'))as x_sc(sno)
	  where Student.Sno=x_sc.sno
	  intersect
	  select Student.Sno,Sname
	  from Student,(select Sno
	                from SC
					where Cno in (select Cno
	                              from Course
					              where Cname='数据结构'))as y_sc(sno)
	  where Student.Sno=y_sc.sno 

	  
/*(10)查询所有学生都选了的课程号;*/ /*嵌套exists,不存在一个学生没选的课程*/
SELECT Cno
        FROM Course
        WHERE NOT EXISTS
                      (SELECT *
                        FROM Student
                        WHERE NOT EXISTS
                                      (SELECT *
                                       FROM SC
                                       WHERE Sno= Student.Sno
                                             AND Cno= Course.Cno
                                      )
                       );

/*(11)查询与“数据结构”具有相同先修课的课程号和课程名;*/
       /*方法1:自身连接*/
	  select c1.Cno,c1.Cname
	  from Course c1,Course c2
	  where c1.Cpno=c2.Cpno and c2.Cname='数据结构' and c1.Cname<>'数据结构';

       /*方法2:嵌套in*/
	  select Cno,Cname
	  from Course 
	  where Cname<>'数据结构' and Cpno in (select Cpno
	                                       from Course
					                       where Cname='数据结构');

       /*方法3:嵌套exists*/
	  select Cno,Cname
	  from Course x
	  where Cname<>'数据结构' and exists (select *
	                                       from Course y
					                       where y.Cpno=x.Cpno and Cname='数据结构');
	   /*方法4:派生表*/
	  select Cno,Cname
	  from Course,(select Cpno
	               from Course
				   where Cname='数据结构')as xcourse(scpno)
	  where Cname<>'数据结构'and Cpno=xcourse.scpno;

/*(12)查询所有具有不及格记录的学生学号和姓名*/
      /*方法1:连接查询*/
       select Student.Sno,Sname
       from Student,SC
	   where Student.Sno=SC.Sno
	   group by Student.Sno,Sname,Grade
	   having Grade<'60';

      /*方法3:嵌套in*/
	  select Sno,Sname
	  from Student
	  where Sno in (select Sno
	                from SC
					where Grade<'60');

      /*方法3:嵌套exists*/
	  select Sno,Sname
	  from Student
	  where exists(select *
	                from SC
					where sno=Student.Sno and Grade<'60');
	  /*方法4:派生表*/
	  select Student.Sno,Sname
	  from Student,(select Sno
	                from SC
					where Grade<'60')as xsc(sno)
	   where Student.Sno=xsc.sno
	   group by Student.Sno,Sname
       
/*(13)查询计算机科学与技术专业学生选修的所有课程号;*/
       /*方法1:连接查询*/
       select SC.Cno
       from Student,SC
	   where Student.Sno=SC.Sno
	   group by SC.Cno,Smajor
	   having Smajor='计算机科学与技术';

       /*方法2:嵌套in*/
	  select distinct Cno
	  from SC
	  where Sno in (select Sno
	                from Student
					where Smajor='计算机科学与技术');

       /*方法3:嵌套exists*/
	  select distinct Cno
	  from SC
	  where exists(select *
	                from Student
					where Sno=SC.Sno and Smajor='计算机科学与技术');
	   /*方法4:派生表*/
       select Cno
       from SC,(select Sno
	            from Student
			    where Smajor='计算机科学与技术')as xstudent(sno)
	   where xstudent.sno=SC.Sno
	   group by Cno;
	   
/*(14)查询所有计算机科学与技术专业学生都选的课程号;*/
SELECT Cno
        FROM Course
        WHERE NOT EXISTS
                      (SELECT *
                        FROM Student
                        WHERE NOT EXISTS
                                      (SELECT *
                                       FROM SC
                                       WHERE Sno= Student.Sno
                                             AND Cno= Course.Cno 
                                      )and Smajor='计算机科学与技术'
                       );

        
/*(15)查询选修了81003号课程并且不及格的学生姓名*/
       /*方法1:多表连接法*/
       select Sname
       from Student,SC
	   where Student.Sno=SC.Sno
	   group by Student.Sno,Sname,Grade,Cno
	   having Grade<'60'and Cno='81003';

       /*方法2:嵌套in*/
	  select Sname
	  from Student
	  where Sno in (select Sno
	                from SC
					where Grade<'60'and Cno='81003');

       /*方法3:交集*/
       select Sname
       from Student,SC
	   where Student.Sno=SC.Sno
	   group by Student.Sno,Sname,Grade,Cno
	   having Grade<'60'
	  intersect
       select Sname
       from Student,SC
	   where Student.Sno=SC.Sno
	   group by Student.Sno,Sname,Grade,Cno
	   having Cno='81003';

	   /*方法4:派生表*/
       select Sname
       from Student,(select Sno
	                from SC
					where Grade<'60'and Cno='81003')as xsc(sno)
	   where Student.Sno=xsc.sno
	   group by Sname;
	   
	   /*方法5:嵌套exists*/
	  select Sname
	  from Student
	  where exists(select *
	                from SC
					where Sno=Student.Sno and Grade<'60'and Cno='81003');	   
	   
/*(16)查询选修了“数据库系统概论”并且不及格的学生姓名*/
       /*方法1:多表连接法*/
       select Sname
       from Student,SC,Course
	   where Student.Sno=SC.Sno and SC.Cno=Course.Cno
	   group by Student.Sno,Sname,Grade,Cname
	   having Grade<'60'and Cname='数据库系统概论';

       /*方法2:嵌套in*/
	  select Sname
	  from Student
	  where Sno in (select Sno
	                from SC
					where Grade<'60'and Cno in (select Cno
					                            from Course
												where Cname='数据库系统概论'));

       /*方法3:交集*/
       select Sname
       from Student,SC
	   where Student.Sno=SC.Sno
	   group by Student.Sno,Sname,Grade
	   having Grade<'60'
	  intersect
       select Sname
       from Student,SC,Course
	   where Student.Sno=SC.Sno and SC.Cno=Course.Cno
	   group by Student.Sno,Sname,Cname
	   having Cname='数据库系统概论';

	   /*方法4:派生表*/
       select Sname
       from Student,(select Sno,Cno
	                from SC
					where Grade<'60')as xsc(sno,cno),(select Cno
					                                  from Course
												      where Cname='数据库系统概论')as xcourse(cno)
	   where Student.Sno=xsc.sno and xsc.cno=xcourse.cno
	   group by Sname;	   
        
/*(17)查询计算机科学与技术专业选修了“数据库系统概论”课且成绩及格的所有学生的学号和姓名;*/
	   /*方法1:多表连接法*/
       select Student.Sno,Sname
       from Student,SC,Course
	   where Student.Sno=SC.Sno and SC.Cno=Course.Cno
	   group by Student.Sno,Sname,Grade,Cname,Smajor
	   having Grade>'60'and Cname='数据库系统概论'and Smajor='计算机科学与技术';

       /*方法2:嵌套in*/
	  select Sno,Sname
	  from Student
	  where Smajor='计算机科学与技术' and Sno in (select Sno
	                                              from SC
					                              where Grade>'60'and Cno in (select Cno
					                                                          from Course
												                              where Cname='数据库系统概论') );

       /*方法3:交集*/
       select Student.Sno,Sname
       from Student,SC
	   where Student.Sno=SC.Sno 
	   group by Student.Sno,Sname,Grade
	   having Grade>'60'
	  intersect
       select Student.Sno,Sname
       from Student,SC,Course
	   where Student.Sno=SC.Sno and SC.Cno=Course.Cno
	   group by Student.Sno,Sname,Grade,Cname,Smajor
	   having Cname='数据库系统概论'
	  intersect
       select Sno,Sname
       from Student
	   where Smajor='计算机科学与技术';


	   /*方法4:派生表*/
       select Student.Sno,Sname
       from Student,(select Sno,Cno
	                from SC
					where Grade>'60')as xsc(sno,cno),(select Cno
					                                  from Course
												      where Cname='数据库系统概论')as xcourse(cno)
	   where Student.Sno=xsc.sno and xsc.cno=xcourse.cno and Smajor='计算机科学与技术'
	   group by Student.Sno,Sname;	   	   
       
/*(18)查询与“刘晨”同岁且不与“刘晨”在同一个系的学生学号与姓名;*/
       /*方法1:嵌套in*/
	   select Sno,Sname
	   from Student
	   where Sname<>'刘晨' and YEAR(GETDATE())-YEAR(sbirthdate)in (select YEAR(GETDATE())-YEAR(sbirthdate)
	                                                               from Student
												                   where Sname='刘晨')and Smajor not in (select Smajor
																                                           from Student
																										   where Sname='刘晨');

       /*方法2:嵌套exists*/
	   select Sno,Sname
	   from Student x
	   where Sname<>'刘晨' 
	   and exists(select *
	              from Student y
				  where YEAR(GETDATE())-YEAR(y.sbirthdate)=YEAR(GETDATE())-YEAR(x.sbirthdate)and y.Sname='刘晨')
				  and  not exists(select *
				  from Student z
				  where z.Smajor=x.Smajor and z.Sname='刘晨');
	    
	   /*方法3:派生表*/     
		select Student.Sno,Sname
		from Student,(select Sno,YEAR(GETDATE())-YEAR(sbirthdate)
	                  from Student
					  where Sname='刘晨')as ystudent(sno,sex),(select Sno,Smajor
														       from Student
														       where Sname='刘晨')as zstudent(sno,smajor)
	    where Sname<>'刘晨'and YEAR(GETDATE())-YEAR(sbirthdate)=ystudent.sex and Student.Smajor<>zstudent.smajor
     

	 



       

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1564069.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【与C++的邂逅】---- 函数重载与引用

关注小庄 顿顿解馋(▿) 喜欢的小伙伴可以多多支持小庄的文章哦 &#x1f4d2; 数据结构 &#x1f4d2; C 引言 : 上一篇博客我们了解了C入门语法的一部分&#xff0c;今天我们来了解函数重载&#xff0c;引用的技术&#xff0c;请放心食用 ~ 文章目录 一. &#x1f3e0; 函数重…

使用vscode前面几行被定住

当我们使用 vscode 滚动代码文档的时候&#xff0c;发现前面几行被定住了&#xff0c;想 css 的 sticky 一样&#xff0c;可能是之前我们不小心点到了这里&#xff0c;取消就好了

视觉Transformer和Swin Transformer

视觉Transformer概述 ViT的基本结构&#xff1a; ①输入图片首先被切分为固定尺寸的切片&#xff1b; ②对展平的切片进行线性映射&#xff08;通过矩阵乘法对维度进行变换&#xff09;&#xff1b; ③为了保留切片的位置信息&#xff0c;在切片送入Transformer编码器之前&…

做抖音小店,体验分一定要很高吗?多少分才是最佳?

大家好&#xff0c;我是电商花花。 做抖音小店&#xff0c;我们都知道体验分非常重要&#xff0c;如果做抖音小店不重视店铺的体验分&#xff0c;对于我们店铺影响还是很大的&#xff0c;体验分不仅影响我们店铺的销量&#xff0c;更是一个店铺流量的直接开关。 店铺体验分越…

Day28:回溯法 LeedCode 93.复原IP地址 78.子集 90.子集II

93. 复原 IP 地址 有效 IP 地址 正好由四个整数&#xff08;每个整数位于 0 到 255 之间组成&#xff0c;且不能含有前导 0&#xff09;&#xff0c;整数之间用 . 分隔。 例如&#xff1a;"0.1.2.201" 和 "192.168.1.1" 是 有效 IP 地址&#xff0c;但是 …

DETREC数据集标注 VOC格式

经过将DETRAC数据集转换成VOC格式&#xff0c;并使用labelimg软件进行查看&#xff0c;发现该数据集存在很多漏标情况&#xff0c;截图如下所示。

121314饿

c语言中的小小白-CSDN博客c语言中的小小白关注算法,c,c语言,贪心算法,链表,mysql,动态规划,后端,线性回归,数据结构,排序算法领域.https://blog.csdn.net/bhbcdxb123?spm1001.2014.3001.5343 给大家分享一句我很喜欢我话&#xff1a; 知不足而奋进&#xff0c;望远山而前行&am…

vue3 记录页面滚动条的位置,并在切换路由时存储或者取消

需求&#xff0c;当页面内容超出了浏览器可是屏幕的高度时&#xff0c;页面会出现滚动条。当我们滚动到某个位置时&#xff0c;操作了其他事件或者跳转了路由&#xff0c;再次回来时&#xff0c;希望还在当时滚动的位置。那我们就进行一下操作。 我是利用了会话存储 sessionSto…

SpringBoot+ECharts+Html 地图案例详解

1. 技术点 SpringBoot、MyBatis、thymeleaf、MySQL、ECharts 等 此案例使用的地图是在ECharts社区中查找的&#xff1a;makeapie echarts社区图表可视化案例 2. 准备条件 在mysql中创建数据库echartsdb&#xff0c;数据库中创建表t_location_count表&#xff0c;表中设置两个…

蚁剑流量分析

蚁剑流量分析 在靶机上面上传一个一句话木马&#xff0c;并使用蚁剑连接&#xff0c;进行抓包, 一句话木马内容 <?php eval($_POST[1]); defalut编码器 在使用蚁剑连接的时候使用default编码器 连接之后进行的操作行为是查看当前目录(/var/www/html)下的文件&#xff0…

InternLM

任务一 运行1.8B模型&#xff0c;并对话 User >>> 请创作一个 300 字的小故事 在一片茂密的森林里&#xff0c;住着一只小松鼠&#xff0c;它的名字叫做小雪。小雪非常活泼好动&#xff0c;经常在树上跳跃玩耍。有一天&#xff0c;小雪发现了一个神秘的洞穴&#xf…

网络编程详解(select poll epoll reactor)

1. 客户端服务器建立连接过程 1.1 编写一个server的步骤是怎么样的&#xff1f; int main(){int listenfd, connfd;pid_t childpid;socklen_t clilen;struct sockaddr_in cliaddr, servaddr;listenfd socket(AF_INET, SOCK_STREAM, 0);bzero(&servaddr, sizeof(servaddr…

【保姆级讲解下MySQL中的drop、truncate和delete的区别】

&#x1f308;个人主页:程序员不想敲代码啊 &#x1f3c6;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家 &#x1f44d;点赞⭐评论⭐收藏 &#x1f91d;希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出指正&#xff0c;让我们共…

4.2学习总结

一.java学习总结 (本次java学习总结,主要总结了抽象类和接口的一些知识,和它们之间的联系和区别) 一.抽象类 1.1定义: 抽象类主要用来抽取子类的通用特性&#xff0c;作为子类的模板&#xff0c;它不能被实例化&#xff0c;只能被用作为子类的超类。 2.概括: 有方法声明&…

在jsp文件内使用jdbc报错

使用idea创建javaweb项目后&#xff0c;在jsp文件内使用jdbc连接数据库错误&#xff0c;显示以下内容&#xff1a; java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriverat org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappCl…

相关滤波跟踪算法-CSK

0. 写在前面 对相关滤波算法综述比较强的文档&#xff1a; NIUBILITY的相关滤波框架详解 - 知乎 (zhihu.com) 1. 概述 相关滤波算法问世之前&#xff0c;跟踪算法饱受运行时间的困扰&#xff0c;直到MOSSE算法出现&#xff0c;直接将算法速度提到了615fps&#xff0c;第一次将…

Makefile:通用部分头文件与条件判断(八)

1、通用部分做头文件 首先举个例子看看为什么需要这个东西&#xff0c;例如在一个文件夹下有两个项目&#xff0c;两个项目都需要编写makefile编译&#xff0c;此时可以使用公共头文件 目录结构如下&#xff1a; 1.1、项目&#xff08;一&#xff09; 有a.cpp、b.cpp、c.cpp…

虚拟机安装银河麒麟

背景 由于Centos将于2024-06-30结束维护【脱保】&#xff0c;届时会存在Bug无人修复及功能无人开发等问题&#xff0c;所以要赶在这个节点前完成操作系统升级。可选的就是RedHat、Ubuntu以及国产信创【中标麒麟、银河麒麟、统信等】&#xff0c;或者使用云上操作系统【例如租阿…

嵌入式4-2

今日作业&#xff1a;使用文件IO 实现父进程向子进程发送信息&#xff0c;并总结中间可能出现的各种问题 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <fcntl.h> #include <unistd.h> int m…

C#中值类型与引用类型的存储

目录 值对象与引用对象的存储 引用对象的成员存储 值对象与引用对象的存储 数据项的类型定义了存储数据需要的内存大小及组成该类型的数据成员。类型还决定了对象在内存中的存储位置——栈或堆。 C#中类型分为两种&#xff1a;值类型和引用类型&#xff0c;这两种类型的对象…