學生表課程表mysql查詢
❶ MySQL問題,在一個學生信息系統中,分別創建學生表、課程表、成績表,求大神解惑
你要建3個表呀,然後分別這下列名,旁邊也有個null別選它就不會唯空,點擊列名旁邊的框框,再右建就可以設置主外鍵。
❷ 學生—課程」資料庫中包含學生表、課程表、學生選課表3個表
看一下。等下寫寫。內
1.
select sno, ssex from student where
sname like '王%'
2.
select sname from student where
sname not like '劉容%'
3.
select sname from student where
sage <20
4.
select sage from student order by sage asc
5. select count(*) from student where sno in (
select sno from sc)
❸ SQL命令 「學生」資料庫中有 「學生表」、「課程表」和 「成績表」。 「學生表」中包含學號、姓名
1、首先在電腦上打開資料庫軟體。然後附加有學生表和成績表的資料庫。
❹ SQL問題有選課表,課程表,學生表,查詢即選擇資料庫有選擇了操作系統的學生
用子查詢
select 姓名
from 學生,選課,課程
where 學生.學號專屬=選課.學號 and 選課.課程號=課程.課程號 and 課程.課程名='資料庫'
and 學生.學號 in
(select 學生.學號
from 學生,選課,課程
where 學生.學號=選課.學號 and 選課.課程號=課程.課程號 and 課程.課程名='操作系統';
}
❺ 學生—課程"資料庫中包含學生表,課程表,學生選課表3個表,分別是:
您好,您這樣:
--1
select Sname,Sage from Student where Sage<(select Sage from Student where Sno='某一學生') and Sdept='數學系'
--2
select Sname from Student where Sno in (select Sno from SC)
--3
select Sname from Student where Sno in (select Sno from SC group by Sno having count(*)=(select count(*) from Course ))
❻ 資料庫多表查詢,學生表,課程表,成績表
直接將三表關聯查詢就可以了
select b.姓名,c.課程,a.成績
from 成績表 a,學生表 b,課程表 c
where a.學生學號 = b.學號 and a.課程編號 = c.編號 and a.成績 < 60
❼ 在學生表,課程表,成績表和老師表四個表中,查詢課程為'資料庫'的,且成績在70到80之間的學生信息
要有表結構才可以寫sql
❽ 假設「學生—課程」資料庫中包含學生表、課程表、學生選課表3個表
--1
selectSname,SagefromStudentwhereSage<(selectSagefromStudentwhereSno='某一學生')andSdept='數學系'
--2
(selectSnofromSC)
--3
((*)=(selectcount(*)fromCourse))
--4
題意不清楚
❾ 資料庫查詢,有三張表學生表STU,課程表Course,SC學生課程關系表(s_id,c_id)
SELECTSTU.s_nameFROMSTU,(SELECTSC.s_idFROMSCGROUPBYs_id
HAVINGCOUNT(*)=(SELECTCOUNT(*)FROMCourse)AStmpWHERESTU.s_id=tmp.s_id
❿ 資料庫中包含學生表、課程表、學生選課表3個表,分別是什麼
1、SELECT 課程號, 課程名, 課程學分
FROM 課程 WHERE 課程號 IN(SELECT 課程號
FROM 選課
GROUP BY 課程號
HAVING COUNT(學生號) BETWEEN 2 AND 4 )
2、SELECT MAX(成績) - MIN(成績) AS 分數之差
FROM 選課
倘若要每門課程相差
SELECT 課程, MAX(成績) - MIN(成績) AS 分數之差
FROM 選課
GROUP BY 課程