寫一個課程表
① SQL語句的一道題 三個基本表:學生表(Student)、課程表(Course)、學生選課表(SC)
1. select * from SC
2. select Sname,Sage from Student where Sdept = '計算機'
3. select Sno,Cno,Grade from SC where Grade >= 70 and Grade <= 80
4. select Sname,Sage from Student where Sage between 18 and 20 and Ssex = '男'
5. select top 1 Grade from SC where Cno = 'C01'
6. select max(Sage),min(Sage) from Student
7. select Sdept,sum(Sno) from Student group by Sdept
8. select course.Cname,sum(sc.Sno),max(Grade) from SC
join studet on Student.Sno = SC.Sno
join Course on Course.Cno = SC.Cno
group by course.cname,max(grade)
9. select sum(Cno),avg(Grade) from SC
join Course on Course.Cno = SC.Cno
join Student on Student.Sno= SC.Sno
order by SC.Sno
10. select Stuent.Sno,Stuent.Sname,sum(Grade) A from SC
join Student on Student.Sno = SC.Sno
group by sc.Sno,student.Sname
having A > 200
11. select Student.Sname,Student.Sdept from Student
join Course on Course.Cno = SC.Cno
join SC on SC.Sno = Student.Sno
where SC.Cno = 'C02'
12. select Student.sname,course.cno,sc.grade from sc
join student on student.sno = sc.sno
join course on course.cno = sc.cno
where sc.grade >= 80
order by sc.grade desc
13. select cno,cname from
(
select course.cno,course.cname,sun(sno) from student
join course on course.cno = sc.cno
join sc on sc.sno = student.sno
group by cno,cname
having sun(sno) > 0
)
14. ① select student.sname,student.sdept from
(
select student.sname,student.sdept,course.cname from student
join sc on sc.sno = student.sno
join course on course.cno = sc.cno
where course.cname = 'C01'
)
② select student.sno,student.sname from
(
select student.sno,student.sname,student.sdept,sc.grade from sc
join student on student.sno = sc,sno
where student.sdept = '信息' and sc.grade >= 80
)
③ select top 1 student.sname from
(
select student.sname,student.sdept,sum(sc.grade) from sc
join student on student.sno = sc.sno
where student.sdept = '計算機'
group by student.sname,student.sdept
order by
)
15. delete from sc where grade < 50
16. update sc set grade += 5 from sc
join course on course.cno = sc.cn
join student on student.sno = sc.sno
where student.sno =
(
select student.sno from sc
join course on course.cno = sc.cno
where course.cname = 'c01'
)
17. update sc set grade += 10 from sc
join student on student.sno = sc.sno
where student.sno =
(
select student.sno from student
join sc on sc.sno = student.sno
join course on course.cno = sc.cno
where student.sdept = '計算機' and course.cname = '計算機文化基礎'
)
18. create view [A] as
select student.sno,student.sname,student.sdept,course.cno,course.cname,sc.grade from sc
join student on student.sno = sc.sno
join course on course.cno = sc.cno
19. create view [A] as
select student.sno,avg(sc.grade) from sc
join student on student.sno = sc.sno
group by student.sno
20. create view [A] as
select student.sno,sum(sc.grade) from sc
join student on student.sno = sc.sno
group by student.sno
21. create index A on student(sname)
22. 不會
② 用C#winform寫一個類似課程表,怎樣寫。
datagridview可以做啊
資料庫的表結構先設計好,在datagridview里寫你的課程,然後保存到資料庫,就行啦,很簡單的
③ 以課程表為題寫一篇作文
一個暴日炎炎的下午,我們正在上語文課。哎!說起來就傷腦筋,這已經是今天上的第N節語文課了,有些課的老師不是參加什麼活動,就是請了病假。
我無精打采地坐在座位上,仰起頭,看著教室里白花花的牆壁,發起呆來。
我心裡想:如果讓我來安排課表那該多好哇!如果真有怎麼一天,我會與眾不同的安排課表。
首先,是令人苦惱的星期一。以前每到這個時候,我總是想:這得什麼時候才能熬到「解放」啊!我將把這一天所有的課程踢開,整天都是電腦課,讓孩子們放鬆一下心情。接著是星期二,這一天要全是體育課,把掃興的老師和下課鈴聲通通不要,讓孩子們一玩起來就沒有盡頭!星期三是獨一無二的「零食課」,讓孩子們吃個夠。星期四來臨了,該安排什麼好呢?睡覺課?不行,不行。哎有了!來個鳳凰山游樂場一日游,我將親自帶領孩子們在鳳凰山森林公園玩個痛快。星期五一眨眼就到了,開始進入正課時間,先上一節為時15分鍾的語文課,作業的,不留!再來一節同樣時間的數學課,僅僅布置一道計算題做做!上完了就馬上放學。另外,我還要安排一個月一次的有趣的出遊活動,一個學期還要有兩次運動會……
如果讓我安排課表的話,我會每一周更新一次課表,讓人感覺無比新奇。
④ SQL查詢,學生表,課程表,成績表的一個查詢要求如下怎麼寫呢
selects.sid,s.sname,sc.scorefromstudent,course,scwherestudent.sid=sc.sidandcourse.cid=sc.cidandcourse.cname='影視設計';
注意一下,你自己寫的sid和sname中間沒有逗號,到時候一定執行報錯
⑤ 英語作文:由一張課程表寫一篇英語作文
today
is
周一/周二/周三來/周四··源····(日期自己寫,我也不知道這是你哪天的課程),i
have
two
classes
in
the
morning
.we
start
the
lessons
at
8:30.
the
first
class
is
english,and
the
second
class
is
maths.then
we
take
a
rest
at
midday.
in
the
afternoon,we
have
four
classes.the
first
one
is
biology
.
the
second
one
is
politics
.
the
third
one
is
the
sports
lesson,
and
the
last
one
is
maths.the
school
will
be
over
at
about
5:30.
after
school,we
go
home
happily.
in
these
classes,
political
is
my
favourite
lesson,becaus
the
teacher
is
very
interesting.
如果哪兒不合適最好自己改改,我也是現寫的,希望能幫上你的忙。
⑥ 我寫了一個學生表(學生id,學生名字),寫了一個課程表(課程id,課程名字,學生id)
外鍵關聯的是另一張表的主鍵,將本表的這個欄位的值約束在關聯的主鍵范圍內。
你這個需求可以寫觸發器實現的
⑦ 仿寫課程表在寫一個
額,只要換下順序就可以了吧
⑧ c語言怎樣編寫課程表,請問程序怎樣寫
鏈表存,
沒學鏈表就數組+結構體完成。還沒學結構體的話你就再啃啃C語言吧
⑨ 課程表怎麼寫啊啊啊啊
你是要英語版的還是中文版的,建議用電腦了的excel設置 然後根據你自己的課程設置啊!不然去網上下載一個超級課程表
⑩ php 寫一個課程表
course表: course_id,course_name
course_schele表: sc_id, week_id, lession_id, course_id