- 博客(11)
- 收藏
- 关注
原创 2021-11-15
(1)查询全体学生信息中不是姓李的同学的信息。(2)查询学号尾号既不是1也不是2的学生信息。(3)查询不住在东软宿舍3栋的老师姓名,及住宿地址。(4)查询姓“张”、“李”、“王”的教师的信息。(1)select *from studentwhere studentname not like ’李%’(2)select *from studentwhere studentid not like ’%1’ and studentid not like ’%2’(3)select teache
2021-11-15 21:48:24 276
原创 2021-11-15
查询2010年有多少个考试不及格的同学。select count(*)from gradewhere schoolyear=’2010’ and grade<60
2021-11-15 21:25:07 183
原创 2021-11-15
(1)查询所有同学的姓名以及出生的天数。(2)查询所有同学姓名及学号最后两位数。(3)查询所有姓李同学的名(1)select studentname as 姓名,datediff(day,birth,getdate()) as 出生天数from student(2)select studentname as 姓名,right(studentid,2) as 学号最后两位数from student(3)select studentname as 姓名from studentwhere s
2021-11-15 15:44:26 124
原创 2021-11-14
用SQL查询所有1994年出生的同学姓名、月份、日期。select studentname,month(birth) as 月份,day(birth) as 日期from studentwhere year(birth)=1994
2021-11-14 18:50:50 133
原创 2021-11-14
用SQL查询student表中所有男同学的姓名和年龄。select studentname,sex,datediff(year,birth,getdate()) as 年龄from studentwhere sex=’男’
2021-11-14 18:41:53 68
原创 2021-11-14
用SQL查询年纪最小的前5名同学的学号,姓名,年龄。select top 5 studentid,studentname,2021-year(birth) as 年龄from studentorder by 2021-year(birth) asc
2021-11-14 18:04:28 777
原创 2021-11-14
用SQL查询2009年考试成绩前5名的同学的学号,课程,及分数。select top 5 studentid,courseid,gradefrom gradewhere schoolyear=2009order by grade desc
2021-11-14 17:54:37 164
原创 2021-11-13
用SQL查询“09软件技术1班”或者是“09软件测试1班”的班级信息。select *from classwhere classname=’09软件技术1班’ or classname=’09软件测试1班’
2021-11-13 16:45:34 195
原创 2021-11-13
用SQL查询出生日期在1975到1980间的教师信息。select *from teacherwhere brith between ’1975’ and ’1980’
2021-11-13 15:59:42 58
原创 2021-11-13
用SQL查询职称为教授或者年龄超过50岁的女教师信息select teacherid,teachername,sex,profession,2021-year(brith)from teacherwhere profession=’教授’ or (sex=’女’ and 2021-year(brith)>50)
2021-11-13 15:46:30 234
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人