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

資料庫語句練習

發布時間: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

閱讀全文

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

熱點內容
Xvp格式文件 瀏覽:728
vb程序執行順序 瀏覽:648
小班編程學什麼 瀏覽:267
獲取文件頁數 瀏覽:140
系統文件夾移動 瀏覽:764
在哪裡查找誤卸載的文件 瀏覽:778
音王inandon歌庫版本 瀏覽:892
16k聘書內容文件 瀏覽:738
itools密碼怎麼找回 瀏覽:668
s7200項目文件路徑 瀏覽:473
電腦桌面文件的存放路徑 瀏覽:836
想學軟體編程哪個培訓學校比較好 瀏覽:748
wps手機版儲存的文件在哪裡 瀏覽:747
電商統計數據哪個好 瀏覽:90
魅族刪除的數據在哪裡 瀏覽:978
肖戰如何學習編程 瀏覽:40
哪裡數據線便宜 瀏覽:549
清理QQ文件微信也被清理 瀏覽:106
微信每天產生多少t數據 瀏覽:379
帶宏程序怎麼編程 瀏覽:359

友情鏈接