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

資料庫語句練習

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

閱讀全文

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

熱點內容
一組數據2的方差是多少 瀏覽:535
電腦設置刪除顯示找不到文件 瀏覽:454
中國證券app有哪些 瀏覽:890
天正施工圖教程 瀏覽:428
家庭網路有什麼 瀏覽:126
紅米升級系統找不到私密文件 瀏覽:557
360衛士文件功能描述 瀏覽:350
魅藍e2升級yunos 瀏覽:381
修改ipadID密碼 瀏覽:308
男生去哪裡學編程 瀏覽:772
膩子數據怎麼恢復 瀏覽:699
win10特殊配置文件登錄 瀏覽:55
可視電話電源網站封住了怎麼辦 瀏覽:811
如何列印word批註 瀏覽:152
qq在線表格換成word文件 瀏覽:138
word文檔里找不到文件這欄 瀏覽:969
如何塑造網站內容公信力 瀏覽:502
文件傳閱系統怎麼取消 瀏覽:392
蘋果付費app從哪裡扣費 瀏覽:496
我的咖啡廳快速升級 瀏覽:559

友情鏈接