- 浏览: 254469 次
- 性别:
- 来自: 北京
-
文章分类
- 全部博客 (221)
- A序 (4)
- 系统学习(读书笔记) (5)
- Computer-base (14)
- RFC-协议规范 (9)
- OS-windows (3)
- OS-linux (10)
- 项目管理-需求设计 (2)
- 设计模式 (1)
- Java-基础-抽象规范 (15)
- Java-基础-core-code (15)
- Java-Thread (15)
- JAVA-stream 流 (1)
- JAVA-socket (13)
- JAVA-SSL (5)
- JAVA-RMI-JMX-OSGI (7)
- java-web (6)
- 工具 (19)
- W3C (16)
- DB (12)
- 读书笔记 (5)
- 中间件 (1)
- C/C++ (1)
- JAVA-JAXB (3)
- Java-UI (1)
- JAVA命令 (1)
- JVM实战 (1)
- java-base (3)
- maven (1)
最新评论
-
Nabulio:
厉害
tomcat 源码学习 -
zbz:
例子很简单,可是怎么设置访问账号和密码呢?注释掉的那段不起作用 ...
jmx 实例--最简单的例子 -
zk302:
格式可以优化下
sql-经典例子练习 -
tuspark:
eclipse的访问控制图标,可以看这篇《eclipse的访问 ...
Eclipse(四)常用设置 -
xlshl43:
流比呀。。。但这排版看的有点蛋疼。。。
Java核心代码(二)Class loader
/************************************************************************************************************
* 数据见50条常用sql.sql脚本
* 1.学生表
* student(studentID,stu_name,stu_age,stu_sex) --studentID 学生编号,stu_name 学生姓名,stu_age 出生年月,stu_sex 学生性别
* 2.课程表
* course(courseID,crs_name,teacherID) --courseID --课程编号,crs_name 课程名称,teacherID 教师编号
* 3.教师表
* teacher(teacherID,tea_name) --teacherID 教师编号,tea_name 教师姓名
* 4.成绩表
* stu_crs(studentID,courseID,score) --studentID 学生编号,courseID 课程编号,score 分数
////"01"课程、"02"课程是变量(记录)。不是常量(字段)。
////如果把"01"、"02"设计成字段,就会使难度降低,但是不够灵活。比如以后会再加一科目04物理。
* ########方法:先确定哪些表的字段,再一一满足条件,即可。
************************************************************************************************************/
表达式:where isnull(b.score,0)是简单的动态,还有动态sql。
连接顺序:选择那个表作为源数据表,那个表优先被连接
3、group by子句将数据划分为多个分组;
5、使用having子句筛选分组;
7、使用order by对结果集进行排序。
group by 、左外连接和where并用。
--1、查询"01"课程比"02"课程成绩高的学生的信息及课程分数
#####同一个表同一个字段值的比较,把一个表变为两个表,才能比较。
#####正常的是,一个字段值和一个常量比较。
有两种情况:1.1、1.2
--1.1、同时存在"01"课程和"02"课程的情况(01必选课,02必选课)
SELECT a.*,b.score,c.score
FROM student a,stu_crs b,stu_crs c
WHERE b.courseID='01' AND c.courseID='02' AND b.score>c.score AND a.studentID=b.studentID AND c.studentID=a.studentID
(a.studentID=b.studentID AND c.studentID=a.studentID这两个都需要,因为c.studentID和b.studentID与a表关联的结果集不一样)
--1.2、存在"01"课程但可能不存在"02"课程的情况、(01必选课,02选修课)、(不存在时显示为null)(以下存在相同内容时不再解释)
select * from student a
left join stu_crs b on a.studentID=b.studentID and b.courseID='01'
left join stu_crs c on a.studentID=c.studentID and c.courseID='04'
and b.score>c.score (and 有8条,where b.score>c.score只有一条)
--3、查询平均成绩大于等于60分的同学的学生编号和学生姓名和平均成绩
select a.*,avg(b.score) from student a,stu_crs b
where a.studentID = b.studentID
group by a.studentID
having avg(b.score)>70
order by avg(b.score) desc
--5、查询所有同学的学生编号、学生姓名、选课总数、所有课程的总成绩
--5.1、查询所有有成绩的SQL。
select a.*,count(b.score),sum(b.score) from student a,stu_crs b
where a.studentID = b.studentID #######因为“表达式需要b.score”,且b.score可能有空的。resultSet7条。
group by a.studentID
--5.2、查询所有(包括有成绩和无成绩)的SQL。
select a.*,count(b.score),sum(b.score) from student a
left join stu_crs b on a.studentID = b.studentID #######left join,因为b.score可能有空的。resultSet8条。
group by a.studentID #######对结果集还要进行计算的,一般需要group by、having
--11、查询没有学全所有课程的同学的信息
select * from student a,stu_crs b,course c
where a.studentID=b.studentID
group by a.studentID
having count(distinct b.courseID) ######不能是count(distinct b.courseID)==1,因为group by a.studentID过了,
< count(distinct c.courseID)
--12、查询至少有一门课与学号为"01"的同学所学相同的同学的信息
select distinct ########distinct过滤重复结果
a.* from student a, stu_crs b where a.studentID = b.studentID and b.courseID
in (select courseID from stu_crs where studentID = '01') and a.studentID <> '01'
--13、查询和"01"号的同学学习的课程完全相同的其他同学的信息
select student.* from student where studentID in
(select distinct stu_crs.studentID from stu_crs where studentID <> '01'
and stu_crs.courseID in (select distinct courseID from stu_crs where studentID = '01') ######限定范围和限定数量一块就可以确定完全一样了。
group by stu_crs.studentID having count(1) = (select count(1) from stu_crs where studentID='01')) ###限定数量,count(1) 与count(*)效果一样。
--15、查询两门及其以上不及格课程的同学的学号,姓名及其平均成绩
select a.*,avg(b.score) from student a,stu_crs b
where a.studentID=b.studentID and a.studentID
in(select studentID from stu_crs where score <60 group by studentID having count(1)>1)
group by a.studentID
--------------------------------未完成--------------------------------
--17、按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩
select a.studentID , a.stu_name ,avg(b.score) ps
max(case c.crs_name when N'语文' then b.score else null end) [语文], #####表达式???????????
from student a
left join stu_crs b on a.studentID = b.studentID
left join course c on b.courseID = c.courseID
group by a.studentID , a.stu_name
order by ps desc #####order by时可以用别名,不用再查一次了。
--21、查询不同老师所教不同课程平均分从高到低显示
select m.teacherID , m.tea_name , cast(avg(o.score) as decimal(18,2)) avg_score
from teacher m , course n , stu_crs o
where m.teacherID = n.teacherID and n.courseID = o.courseID
group by m.teacherID , m.tea_name
order by avg_score destu_crs
--22、查询所有课程的成绩第2名到第3名的学生信息及该课程成绩
--22.1 sql 2000用子查询完成
--score重复时保留名次空缺
select * from (select t.* , px = (select count(1) from stu_crs where courseID = t.courseID and score > t.score) + 1 from stu_crs t) m where px between 2 and 3 order by m.courseID , m.px
--score重复时合并名次
select * from (select t.* , px = (select count(distinct score) from stu_crs where courseID = t.courseID and score >= t.score) from stu_crs t) m where px between 2 and 3 order by m.courseID , m.px
--22.2 sql 2005用rank,DENSE_RANK完成
--score重复时保留名次空缺(rank完成)
select * from (select t.* , px = rank() over(partition by courseID order by score destu_crs) from stu_crs t) m where px between 2 and 3 order by m.courseID , m.px
--score重复时合并名次(DENSE_RANK完成)
select * from (select t.* , px = DENSE_RANK() over(partition by courseID order by score destu_crs) from stu_crs t) m where px between 2 and 3 order by m.courseID , m.px
--23、统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[0-60]及所占百分比
--23.1 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[0-60]
--横向显示
select course.courseID [课程编号] , crs_name as [课程名称] ,
sum(case when score >= 85 then 1 else 0 end) [85-100],
sum(case when score >= 70 and score < 85 then 1 else 0 end) [70-85],
sum(case when score >= 60 and score < 70 then 1 else 0 end) [60-70],
sum(case when score < 60 then 1 else 0 end) [0-60]
from stu_crs , course
where stu_crs.courseID = course.courseID
group by course.courseID , course.crs_name
order by course.courseID
--纵向显示1(显示存在的分数段)
select m.courseID [课程编号] , m.crs_name [课程名称] , 分数段 = (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end) ,
count(1) 数量
from course m , stu_crs n
where m.courseID = n.courseID
group by m.courseID , m.crs_name , (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end)
order by m.courseID , m.crs_name , 分数段
--纵向显示2(显示存在的分数段,不存在的分数段用0显示)
select m.courseID [课程编号] , m.crs_name [课程名称] , 分数段 = (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end) ,
count(1) 数量
from course m , stu_crs n
where m.courseID = n.courseID
group by all m.courseID , m.crs_name , (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end)
order by m.courseID , m.crs_name , 分数段
--23.2 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[<60]及所占百分比
--横向显示
select m.courseID 课程编号, m.crs_name 课程名称,
(select count(1) from stu_crs where courseID = m.courseID and score < 60) [0-60],
cast((select count(1) from stu_crs where courseID = m.courseID and score < 60)*100.0 / (select count(1) from stu_crs where courseID = m.courseID) as decimal(18,2)) [百分比(%)],
(select count(1) from stu_crs where courseID = m.courseID and score >= 60 and score < 70) [60-70],
cast((select count(1) from stu_crs where courseID = m.courseID and score >= 60 and score < 70)*100.0 / (select count(1) from stu_crs where courseID = m.courseID) as decimal(18,2)) [百分比(%)],
(select count(1) from stu_crs where courseID = m.courseID and score >= 70 and score < 85) [70-85],
cast((select count(1) from stu_crs where courseID = m.courseID and score >= 70 and score < 85)*100.0 / (select count(1) from stu_crs where courseID = m.courseID) as decimal(18,2)) [百分比(%)],
(select count(1) from stu_crs where courseID = m.courseID and score >= 85) [85-100],
cast((select count(1) from stu_crs where courseID = m.courseID and score >= 85)*100.0 / (select count(1) from stu_crs where courseID = m.courseID) as decimal(18,2)) [百分比(%)]
from course m
order by m.courseID
--纵向显示1(显示存在的分数段)
select m.courseID [课程编号] , m.crs_name [课程名称] , 分数段 = (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end) ,
count(1) 数量 ,
cast(count(1) * 100.0 / (select count(1) from stu_crs where courseID = m.courseID) as decimal(18,2)) [百分比(%)]
from course m , stu_crs n
where m.courseID = n.courseID
group by m.courseID , m.crs_name , (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end)
order by m.courseID , m.crs_name , 分数段
--纵向显示2(显示存在的分数段,不存在的分数段用0显示)
select m.courseID [课程编号] , m.crs_name [课程名称] , 分数段 = (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end) ,
count(1) 数量 ,
cast(count(1) * 100.0 / (select count(1) from stu_crs where courseID = m.courseID) as decimal(18,2)) [百分比(%)]
from course m , stu_crs n
where m.courseID = n.courseID
group by all m.courseID , m.crs_name , (
case when n.score >= 85 then '85-100'
when n.score >= 70 and n.score < 85 then '70-85'
when n.score >= 60 and n.score < 70 then '60-70'
else '0-60'
end)
order by m.courseID , m.crs_name , 分数段
--24、查询学生平均成绩及其名次
--24.1 查询学生的平均成绩并进行排名,sql 2000用子查询完成,分平均成绩重复时保留名次空缺和不保留名次空缺两种。
select t1.* , px = (select count(1) from
(
select m.studentID [学生编号] ,
m.stu_name [学生姓名] ,
isnull(cast(avg(score) as decimal(18,2)),0) [平均成绩]
from student m left join stu_crs n on m.studentID = n.studentID
group by m.studentID , m.stu_name
) t2 where 平均成绩 > t1.平均成绩) + 1 from
(
select m.studentID [学生编号] ,
m.stu_name [学生姓名] ,
isnull(cast(avg(score) as decimal(18,2)),0) [平均成绩]
from student m left join stu_crs n on m.studentID = n.studentID
group by m.studentID , m.stu_name
) t1
order by px
select t1.* , px = (select count(distinct 平均成绩) from
(
select m.studentID [学生编号] ,
m.stu_name [学生姓名] ,
isnull(cast(avg(score) as decimal(18,2)),0) [平均成绩]
from student m left join stu_crs n on m.studentID = n.studentID
group by m.studentID , m.stu_name
) t2 where 平均成绩 >= t1.平均成绩) from
(
select m.studentID [学生编号] ,
m.stu_name [学生姓名] ,
isnull(cast(avg(score) as decimal(18,2)),0) [平均成绩]
from student m left join stu_crs n on m.studentID = n.studentID
group by m.studentID , m.stu_name
) t1
order by px
--24.2 查询学生的平均成绩并进行排名,sql 2005用rank,DENSE_RANK完成,分平均成绩重复时保留名次空缺和不保留名次空缺两种。
select t.* , px = rank() over(order by [平均成绩] destu_crs) from
(
select m.studentID [学生编号] ,
m.stu_name [学生姓名] ,
isnull(cast(avg(score) as decimal(18,2)),0) [平均成绩]
from student m left join stu_crs n on m.studentID = n.studentID
group by m.studentID , m.stu_name
) t
order by px
select t.* , px = DENSE_RANK() over(order by [平均成绩] destu_crs) from
(
select m.studentID [学生编号] ,
m.stu_name [学生姓名] ,
isnull(cast(avg(score) as decimal(18,2)),0) [平均成绩]
from student m left join stu_crs n on m.studentID = n.studentID
group by m.studentID , m.stu_name
) t
order by px
--25、查询各科成绩前三名的记录
--25.1 分数重复时保留名次空缺
select m.* , n.courseID , n.score from student m, stu_crs n where m.studentID = n.studentID and n.score in
(select top 3 score from stu_crs where courseID = n.courseID order by score destu_crs) order by n.courseID , n.score destu_crs
--25.2 分数重复时不保留名次空缺,合并名次
--sql 2000用子查询实现
select * from (select t.* , px = (select count(distinct score) from stu_crs where courseID = t.courseID and score >= t.score) from stu_crs t) m where px between 1 and 3 order by m.courseID , m.px
--sql 2005用DENSE_RANK实现
select * from (select t.* , px = DENSE_RANK() over(partition by courseID order by score destu_crs) from stu_crs t) m where px between 1 and 3 order by m.courseID , m.px
--26、查询每门课程被选修的学生数
select courseID , count(studentID)[学生数] from stu_crs group by courseID
--27、查询出只有两门课程的全部学生的学号和姓名
select student.studentID , student.stu_name
from student , stu_crs
where student.studentID = stu_crs.studentID
group by student.studentID , student.stu_name
having count(stu_crs.courseID) = 2
order by student.studentID
--28、查询男生、女生人数
select count(stu_sex) as 男生人数 from student where stu_sex = N'男'
select count(stu_sex) as 女生人数 from student where stu_sex = N'女'
select sum(case when stu_sex = N'男' then 1 else 0 end) [男生人数],sum(case when stu_sex = N'女' then 1 else 0 end) [女生人数] from student
select case when stu_sex = N'男' then N'男生人数' else N'女生人数' end [男女情况] , count(1) [人数] from student group by case when stu_sex = N'男' then N'男生人数' else N'女生人数' end
--29、查询名字中含有"风"字的学生信息
select * from student where stu_name like N'%风%'
select * from student where charindex(N'风' , stu_name) > 0
--30、查询同名同性学生名单,并统计同名人数
select stu_name [学生姓名], count(*) [人数] from student group by stu_name having count(*) > 1
--31、查询1990年出生的学生名单(注:student表中stu_age列的类型是datetime)
select * from student where year(stu_age) = 1990
select * from student where datediff(yy,stu_age,'1990-01-01') = 0
select * from student where datepart(yy,stu_age) = 1990
select * from student where convert(varchar(4),stu_age,120) = '1990'
--32、查询每门课程的平均成绩,结果按平均成绩降序排列,平均成绩相同时,按课程编号升序排列
select m.courseID , m.crs_name , cast(avg(n.score) as decimal(18,2)) avg_score
from course m, stu_crs n
where m.courseID = n.courseID
group by m.courseID , m.crs_name
order by avg_score destu_crs, m.courseID astu_crs
--33、查询平均成绩大于等于85的所有学生的学号、姓名和平均成绩
select a.studentID , a.stu_name , cast(avg(b.score) as decimal(18,2)) avg_score
from student a , stu_crs b
where a.studentID = b.studentID
group by a.studentID , a.stu_name
having cast(avg(b.score) as decimal(18,2)) >= 85
order by a.studentID
--34、查询课程名称为"数学",且分数低于60的学生姓名和分数
select stu_name , score
from student , stu_crs , course
where stu_crs.studentID = student.studentID and stu_crs.courseID = course.courseID and course.crs_name = N'数学' and score < 60
--35、查询所有学生的课程及分数情况;
select student.* , course.crs_name , stu_crs.courseID , stu_crs.score
from student, stu_crs , course
where student.studentID = stu_crs.studentID and stu_crs.courseID = course.courseID
order by student.studentID , stu_crs.courseID
--36、查询任何一门课程成绩在70分以上的姓名、课程名称和分数;
select student.* , course.crs_name , stu_crs.courseID , stu_crs.score
from student, stu_crs , course
where student.studentID = stu_crs.studentID and stu_crs.courseID = course.courseID and stu_crs.score >= 70
order by student.studentID , stu_crs.courseID
--37、查询不及格的课程
select student.* , course.crs_name , stu_crs.courseID , stu_crs.score
from student, stu_crs , course
where student.studentID = stu_crs.studentID and stu_crs.courseID = course.courseID and stu_crs.score < 60
order by student.studentID , stu_crs.courseID
--38、查询课程编号为01且课程成绩在80分以上的学生的学号和姓名;
select student.* , course.crs_name , stu_crs.courseID , stu_crs.score
from student, stu_crs , course
where student.studentID = stu_crs.studentID and stu_crs.courseID = course.courseID and stu_crs.courseID = '01' and stu_crs.score >= 80
order by student.studentID , stu_crs.courseID
--39、求每门课程的学生人数
select course.courseID , course.crs_name , count(*) [学生人数]
from course , stu_crs
where course.courseID = stu_crs.courseID
group by course.courseID , course.crs_name
order by course.courseID , course.crs_name
--40、查询选修"张三"老师所授课程的学生中,成绩最高的学生信息及其成绩
--40.1 当最高分只有一个时
select top 1 student.* , course.crs_name , stu_crs.courseID , stu_crs.score
from student, stu_crs , course , teacher
where student.studentID = stu_crs.studentID and stu_crs.courseID = course.courseID and course.teacherID = teacher.teacherID and teacher.tea_name = N'张三'
order by stu_crs.score destu_crs
--40.2 当最高分出现多个时
select student.* , course.crs_name , stu_crs.courseID , stu_crs.score
from student, stu_crs , course , teacher
where student.studentID = stu_crs.studentID and stu_crs.courseID = course.courseID and course.teacherID = teacher.teacherID and teacher.tea_name = N'张三' and
stu_crs.score = (select max(stu_crs.score) from stu_crs , course , teacher where stu_crs.courseID = course.courseID and course.teacherID = teacher.teacherID and teacher.tea_name = N'张三')
--41、查询不同课程成绩相同的学生的学生编号、课程编号、学生成绩
--方法1
select m.* from stu_crs m ,(select courseID , score from stu_crs group by courseID , score having count(1) > 1) n
where m.courseID= n.courseID and m.score = n.score order by m.courseID , m.score , m.studentID
--方法2
select m.* from stu_crs m where exists (select 1 from (select courseID , score from stu_crs group by courseID , score having count(1) > 1) n
where m.courseID= n.courseID and m.score = n.score) order by m.courseID , m.score , m.studentID
--42、查询每门功成绩最好的前两名
select t.* from stu_crs t where score in (select top 2 score from stu_crs where courseID = T.courseID order by score destu_crs) order by t.courseID , t.score destu_crs
--43、统计每门课程的学生选修人数(超过5人的课程才统计)。要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列
select course.courseID , course.crs_name , count(*) [学生人数]
from course , stu_crs
where course.courseID = stu_crs.courseID
group by course.courseID , course.crs_name
having count(*) >= 5
order by [学生人数] destu_crs , course.courseID
--44、检索至少选修两门课程的学生学号
select student.studentID , student.stu_name
from student , stu_crs
where student.studentID = stu_crs.studentID
group by student.studentID , student.stu_name
having count(1) >= 2
order by student.studentID
--45、查询选修了全部课程的学生信息
--方法1 根据数量来完成
select student.* from student where studentID in
(select studentID from stu_crs group by studentID having count(1) = (select count(1) from course))
--方法2 使用双重否定来完成
select t.* from student t where t.studentID not in
(
select distinct m.studentID from
(
select studentID , courseID from student , course
) m where not exists (select 1 from stu_crs n where n.studentID = m.studentID and n.courseID = m.courseID)
)
--方法3 使用双重否定来完成
select t.* from student t where not exists(select 1 from
(
select distinct m.studentID from
(
select studentID , courseID from student , course
) m where not exists (select 1 from stu_crs n where n.studentID = m.studentID and n.courseID = m.courseID)
) k where k.studentID = t.studentID
)
--46、查询各学生的年龄
--46.1 只按照年份来算
select * , datediff(yy , stu_age , getdate()) [年龄] from student
--46.2 按照出生日期来算,当前月日 < 出生年月的月日则,年龄减一
select * , case when right(convert(varchar(10),getdate(),120),5) < right(convert(varchar(10),stu_age,120),5) then datediff(yy , stu_age , getdate()) - 1 else datediff(yy , stu_age , getdate()) end [年龄] from student
--47、查询本周过生日的学生
select * from student where datediff(week,datename(yy,getdate()) + right(convert(varchar(10),stu_age,120),6),getdate()) = 0
--48、查询下周过生日的学生
select * from student where datediff(week,datename(yy,getdate()) + right(convert(varchar(10),stu_age,120),6),getdate()) = -1
--49、查询本月过生日的学生
select * from student where datediff(mm,datename(yy,getdate()) + right(convert(varchar(10),stu_age,120),6),getdate()) = 0
--50、查询下月过生日的学生
select * from student where datediff(mm,datename(yy,getdate()) + right(convert(varchar(10),stu_age,120),6),getdate()) = -1
drop table student,course,teacher,stu_crs
发表评论
-
sql 总结
2015-12-03 17:28 3891,将查询结果作为临时表: select * from ( ... -
Reserved-7
2014-03-24 17:37 617ffff -
SQL事务锁
2014-03-24 17:35 843保持数据库的纯粹性:完整性约束实际用不到,存储过程也不用。 ... -
sql-语法
2012-11-08 09:04 947@@IDENTITY全局变量, ... -
sql-概述
2012-11-08 09:04 770SQL(Structure Query Language ... -
oracle-语句
2012-11-09 11:08 946执行脚本 SQL> @ d:\test. ... -
oracle-索引
2012-11-09 11:08 898索引,为了提高查询速率//作用类似“书的目录” 索引的 ... -
oracle-自身函数
2012-11-09 11:08 13602、字典________________________ ... -
oracle-理论
2012-11-09 11:07 904网状DB-->关系DB--> ... -
oracle-常用函数
2012-11-09 11:07 849dual表可以用了查询很多。 1.ascii(s ... -
mysql 模板
2012-11-08 09:05 13051、概论________________________ ...
相关推荐
java毕业设计源码,可供参考
Windows下的FRP图形化客户端,对应FRP版本0.61.1,需要64位操作系统
基于优化EKF的PMSM无位置传感器矢量控制研究_崔鹏龙.pdf
旧物置换网站的开发过程中,采用B / S架构,主要使用Java技术进行开发,结合最新流行的springboot框架。中间件服务器是Tomcat服务器,使用Mysql数据库和Eclipse开发 环境。该旧物置换网站包括管理员、用户、卖家。其主要功能包括管理员:首页、个人中心、用户管理、卖家管理、旧物类型管理、旧物信息管理、置换交易管理、系统管理等,卖家后台:首页、个人中心、旧物类型管理、旧物信息管理、置换交易管理。前台首页;首页、旧物信息、网站公告、个人中心、后台管理等,用户后台:首页、个人中心、旧物信息管理、置换交易管理、用户可根据关键字进行信息的查找自己心仪的信息等。 (1)用户功能需求 用户进入前台系统可以查看首页、旧物信息、网站公告、个人中心、后台管理等操作。前台首页用例如图3-1所示。 (2)管理员功能需求 管理员登陆后,主要功能模块包括首页、个人中心、用户管理、卖家管理、旧物类型管理、旧物信息管理、置换交易管理、系统管理等功能。 关键词:旧物置换网站,Mysql数据库,Java技术 springboot框架
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行;功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用
航天模拟器文件、蓝图、代码
两级式单相光伏并网仿真研究:MATLAB 2021a版本下的DC-DC变换与桥式逆变技术实现功率跟踪与并网效果优化,基于Matlab 2021a的两级式单相光伏并网仿真研究:实现最大功率跟踪与稳定的直流母线电压,两级式单相光伏并网仿真(注意版本matlab 2021a) 前级采用DC-DC变电路,通过MPPT控制DC-DC电路的pwm波来实现最大功率跟踪,mppt采用扰动观察法,后级采用桥式逆变,用spwm波调制。 采用双闭环控制,实现直流母线电压的稳定和单位功率因数。 并网效果良好,thd满足并网要求,附带仿真说明文件 ,两级式单相光伏并网仿真; MATLAB 2021a; DC-DC变换电路; MPPT控制; 扰动观察法; 桥式逆变; SPWM波调制; 双闭环控制; 直流母线电压稳定; 单位功率因数; 并网效果; THD。,MATLAB 2021a双闭环控制两级式单相光伏并网仿真研究
光伏MPPT仿真研究:光照强度和温度对太阳能电池输出特性的影响及调整策略,助力光伏发电学习。,光伏MPPT仿真研究:光照强度和温度对太阳能电池输出特性的影响及调整策略学习指南,光伏mppt仿真:通过调整太阳光照, 温度等因素 , 光照强度和温度对太阳能电池输出特性的影响。 可用于学习光伏发电 ,光伏MPPT仿真;太阳光照调整;温度影响;光照强度;太阳能电池输出特性。,光伏MPPT仿真:光照与温度对太阳能电池输出特性的影响研究
随着互联网技术的高速发展,人们生活的各方面都受到互联网技术的影响。现在人们可以通过互联网技术就能实现不出家门就可以通过网络进行系统管理,交易等,而且过程简单、快捷。同样的,在人们的工作生活中,也就需要互联网技术来方便人们的日常工作生活,实现工作办公的自动化处理,实现信息化,无纸化办公。 本课题在充分研究了在Springboot框架基础上,采用B/S模式,以Java为开发语言,MyEclipse为开发工具,MySQL为数据管理平台,实现的内容主要包括首页,个人中心,综合管理等功能。
航天模拟器文件、蓝图、代码
西门子Smart PLC四轴搬运取料机案例程序:从新手到项目的跃升之路,西门子Smart PLC四轴搬运取料机运动控制案例程序——PLC通信与伺服电机自动化控制解决方案,西门子200smart运动控制四轴搬运取料机案例程序 该程序为两台smart plc通过通讯控制四轴伺服电机的搬运取料机案例工程案例程序。 包含200smar_PLC程序+项目电气接线图(PDF图纸)+程序流程说明+触摸屏程序(步科) 程序包括伺服电机的启动,停止,原点定位,回归原点,位置控制以及方向控制。 包括了所有控制伺服电机的指令,里面有指令的用法的详细解释和程序说明。 拿来就能用的案例程序,结合程序案例中学习,就会轻松快速的掌握。 让你从新手直接能做项目。 动作流程: 客户上好料盒,M1轴伺服跑到第一片料的位置,气缸将料推出到上位置, M2轴在上料位置取件后移动到直线电机的,加工位置,m2轴上通过有上料下料的气缸, 用真空吸住料后m2轴移动到一个二维平台的加工位置,把带加工的料放到加工位置后, 激光器开始加工,加工完成后,通过M2轴把料取下,移动到成品放料位置,放料后, M3轴将成品料推送到M4
航天模拟器文件、蓝图、代码
基于双碳背景下阶梯式碳交易机制与电制氢的综合能源系统热电优化策略研究与求解分析,基于双碳背景下阶梯式碳交易机制与电制氢的综合能源系统热电优化策略及经济性研究,考虑阶梯式碳交易机制与电制氢的综合能源系统热电优化 “双碳”背景下,为提高能源利用率,优化设备的运行灵活性,进一步降低综合能源系统(IES)的碳排放水平,提出一种IES低碳经济运行策略。 首先考虑IES参与到碳交易市场,引入阶梯式碳交易机制引导IES控制碳排放;接着细化电转气(P2G)的两阶段运行过程,引入电解槽、甲烷反应器、氢燃料电池(HFC)替传统的P2G,研究氢能的多方面效益;最后提出热电比可调的热电联产、HFC运行策略,进一步提高IES的低碳性与经济性。 基于此,构建以购能成本、碳排放成本、弃风成本最小的低碳经济运行目标,将原问题转化为混合整数线性问题,运用CPLEX商业求解器进行求解,通过设置多个运行情景,对比验证了所提策略的有效性。 关键词:氢能;阶梯式碳交易机制;热电比可调;综合能源系统;低碳经济 ,关键词:阶梯式碳交易机制;综合能源系统(IES);热电优化;设备运行灵活性;碳排放水平;电转气(P2G);电解槽;氢
MMC分布式储能系统:实现恒功率与恒电压控制的无缝切换技术,MMC分布式储能系统实现恒功率与恒电压控制的无缝切换技术,mmc分布式储能 恒功率控制 恒电压控制 无缝切 ,核心关键词:MMC分布式储能; 恒功率控制; 恒电压控制; 无缝切换。,MMC分布式储能系统:恒功率与恒电压控制的无缝切换技术
多频多快拍稀疏贝叶斯学习目标方位序贯估计_牛海强.pdf
交错并联Boost PFC仿真电路模型:双闭环控制方式下的输出电压与电感电流优化控制,优良波形及Simulink仿真实现,交错并联Boost PFC仿真电路模型:双闭环控制方式下的电压外环与电感电流内环优化,优质波形表现于Simulink仿真中,交错并联Boost PFC仿真电路模型 采用输出电压外环,电感电流内环的双闭环控制方式 交流侧输入电流畸变小,波形良好,如效果图所示 simulink仿真 matlab simulink仿真模型 无报告哈 ,核心关键词:交错并联Boost PFC仿真电路模型;双闭环控制方式;输出电压外环;电感电流内环;交流侧输入电流畸变小;波形良好;Simulink仿真;Matlab Simulink仿真模型。,基于Simulink仿真的交错并联Boost PFC双闭环控制模型优化研究
基于53#三菱PLC与组态王系统的音乐喷泉控制系统设计与组态设计探讨,基于53#三菱PLC的组态王音乐喷泉控制系统设计与实现:音乐喷泉组态设计的探索与实践,53#三菱PLC和组态王音乐喷泉控制系统设计音乐喷泉组态设计音乐喷泉 ,53#三菱PLC; 组态王音乐喷泉控制系统设计; 音乐喷泉组态设计; 音乐喷泉,三菱PLC与组态王协同音乐喷泉控制系统设计
(要求1)基于随机博弈的无人机集群动态对抗决策.pdf
基于特征值与特征向量的计算,实现MATLAB代码进行参与因子分析研究,特征值与特征向量计算:MATLAB代码实现因子分析的方法与步骤,特征值、左右特征向量计算,参与因子分析MATLAB代码 ,特征值; 左右特征向量计算; 参与因子分析; MATLAB代码,MATLAB中特征值与左右特征向量计算,助力因子分析
基于Matlab的无线充电仿真研究:四套模型解析——LLC谐振恒压输出、LCC-S拓扑磁耦合谐振恒压输出、LCC-P拓扑磁耦合谐振恒流输出及S-S拓扑补偿模型探究,基于Matlab的无线充电仿真研究:四套模型深度解析——LLC谐振器恒压输出与磁耦合谐振无线电能传输技术,无线充电仿真 simulink 磁耦合谐振 无线电能传输 MCR WPT lcc ss llc拓扑补偿 基于matlab 一共四套模型: 1.llc谐振器实现12 24V恒压输出 带调频闭环控制 附参考和讲解视频 2.lcc-s拓扑磁耦合谐振实现恒压输出 附设计过程和介绍 3.lcc-p拓扑磁耦合谐振实现恒流输出 附设计过程 4.s-s拓扑补偿 带原理分析,仿真搭建讲解和参考,可依据讲解自行修改参数建模 四套打包 ,无线充电仿真; Simulink; 磁耦合谐振; 无线电能传输; MCR; WPT; LLC拓扑补偿; LCC-S拓扑; 调频闭环控制; 设计过程; 恒压输出; 恒流输出; 参数建模。,基于Matlab Simulink的无线充电仿真模型:MCR WPT的LLC、LCC-S、LCC-P及S-S拓扑研