導航:首頁 > 編程大全 > 資料庫語句練習

資料庫語句練習

發布時間:2023-07-08 09:40:23

『壹』 資料庫SQL查詢語句題目,求大神幫忙~

(6)select學號,姓名from學生表a,選課表bwherea.學號=b.學號
and課程號'5'

(7)select學號from選課where課程號notin('5')

(8)select學號from選課where課程號in('5','6')

(9)select學號,姓名from學生表a,選課表bwherea.學號=b.學號
and課程號in(select課程號from課程表)

(10)select學號,姓名from學生表a,選課表bwherea.學號=b.學號
and課程號in(select課程號from選課表where學號='95001')

『貳』 資料庫SQL語句考試

insert into A values('010102','張靜',『抄』襲,『』,『機電』)

update C set GRADE='59' where GRADE>=60

delete from A where SN like '李%'

select S#,SEX,AGE from A where SN='劉華'

select A.S#,CN from A,B,C where A.S#=C.S# and C.C#=B.C# and A.DEPT not in ('計算機系','法律系')

select C.S#,sum(GRADE) from C where C.S# in (select C.S# from B,C where B.CN='大學語文' and B.C#=C.C#) order by sum(GRADE) desc

update A set SEX='',AGE=''

drop table A
drop table B
drop table C

『叄』 SQL資料庫語句大全

SQL資料庫語句大全:

1、選擇:select * from table1 where 范圍

2、插入:insert into table1(field1,field2) values(value1,value2)

3、刪除:delete from table1 where 范圍

4、更新:update table1 set field1=value1 where 范圍

5、排序:select * from table1 order by field1,field2 [desc]

6、總數:select count as totalcount from table1

7、求和:select sum(field1) as sumvalue from table1

『肆』 資料庫select語句練習題啊!!!

10.題答案抄
select 課程號襲,總分,平均分,最高分,最低分(
select 課程號,
總分=sum(成績),
平均分=sum(成績)/count(*),
最高分=max(成績),
最低分=min(成績)
from 成績
group by 課程號) as kc order by 平均分 desc
11.題答案
select 課程號,
平均分=sum(成績)/count(*)
from 成績
where 課程號='1001' or 課程號='1002'
group by 課程號
12.題答案
select 姓名,xs.學號,kc.平均分
from 學生 as xs
left join (select 學號,
平均分=sum(成績)/count(*)
from 成績
group by 學號) as kc on kc.學號=xs.學號
where kc.平均分>80

閱讀全文

與資料庫語句練習相關的資料

熱點內容
安卓網路顯示h2是什麼意思 瀏覽:90
哪個拍照app好 瀏覽:70
文件被設置隱藏屬性如何顯示 瀏覽:142
網路電視的好處 瀏覽:657
cf槍戰王者手游下載官網下載最新版本下載 瀏覽:925
stm32固件庫版本查看 瀏覽:396
如何從數控編程小白到大師 瀏覽:183
更改微信共享實時位置信息 瀏覽:13
js姓名正則 瀏覽:843
如何利用串口傳輸文件夾 瀏覽:346
jca文件怎麼用word打開 瀏覽:965
U盤文件木馬隱藏exe工具 瀏覽:152
下載優酷app視頻播放器安裝 瀏覽:38
兩個excel文件不同 瀏覽:585
如何更新網站內容 瀏覽:953
什麼網站下載廣場舞是免費的 瀏覽:307
西門子編程軟體怎麼變成中文 瀏覽:984
居客來wifi密碼 瀏覽:604
文件為何為空linux 瀏覽:630
美劇鳥app安裝包在手機哪裡 瀏覽:985

友情鏈接