SQL語(yǔ)句練習(xí)及答案_第1頁(yè)
SQL語(yǔ)句練習(xí)及答案_第2頁(yè)
SQL語(yǔ)句練習(xí)及答案_第3頁(yè)
SQL語(yǔ)句練習(xí)及答案_第4頁(yè)
SQL語(yǔ)句練習(xí)及答案_第5頁(yè)
已閱讀5頁(yè),還剩16頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、精選優(yōu)質(zhì)文檔-傾情為你奉上sql語(yǔ)句練習(xí)題1數(shù)據(jù)庫(kù)有如下四個(gè)表格:student(sno,sname,sage,ssex,sdpt) 學(xué)生表系表(dptno,dname)course(cno,cname, gradet, tno) 課程表sc(sno,cno,score) 成績(jī)表teacher(tno,tname) 教師表 要求:完成以下操作1. 查詢(xún)姓"歐陽(yáng)"且全名為三個(gè)漢字的學(xué)生的姓名。select sname from student  where sname like “歐陽(yáng)_;2. 查詢(xún)名字中第

2、2個(gè)字為"陽(yáng)"字的學(xué)生的姓名和學(xué)號(hào)。 select sname,sno from student  where sname like '_陽(yáng)%';3. 查詢(xún)所有不姓劉的學(xué)生姓名。select sname,sno,ssex from student  where sname not like “劉%”;4. 查詢(xún)db_design課程的課程號(hào)和學(xué)分。 select cno,ccred

3、it from course where cname like 'db_design' 5. 查詢(xún)以"db_"開(kāi)頭,且倒數(shù)第3個(gè)字符為i的課程的詳細(xì)情況。 select * from course  where cname like 'db%i_ _';6. 某些學(xué)生選修課程后沒(méi)有參加考試,所以有選課記錄,但沒(méi)有考試成績(jī)。查詢(xún)?nèi)鄙俪煽?jī)的學(xué)生的學(xué)號(hào)和相應(yīng)的課程號(hào)。select sno,c

4、no from sc where grade is null;7. 查所有有成績(jī)的學(xué)生學(xué)號(hào)和課程號(hào)。select sno,cno from sc where grade is not null;8. 查詢(xún)計(jì)算機(jī)系年齡在20歲以下的學(xué)生姓名。 select sname from student  where sdept= 'cs' and sage<

5、;20;9. 查詢(xún)選修了3號(hào)課程的學(xué)生的學(xué)號(hào)及其成績(jī),查詢(xún)結(jié)果按分?jǐn)?shù)降序排列。 select sno,grade from sc  where cno= ' 3 '  order by grade desc;10. 查詢(xún)學(xué)生總?cè)藬?shù)。select count(*) from student;11. 查詢(xún)選修了課程的學(xué)生人數(shù)。select count(distinct sno) from

6、0;sc;12. 計(jì)算1號(hào)課程的學(xué)生平均成績(jī)。select avg(grade) from sc  where cno= ' 1 ';13. 查詢(xún)選修1號(hào)課程的學(xué)生最高分?jǐn)?shù)。select max(grade) from sc  where cno= ' 1 ';14. 查詢(xún)學(xué)生選修課程的總學(xué)分?jǐn)?shù)。select sum(grade) from sc,course wh

7、ere sno= '  ' and o=o;15. 查詢(xún)選修了3門(mén)以上課程的學(xué)生學(xué)號(hào)。select sno from sc group by sno  having count(*) >3;  16. 查詢(xún)每個(gè)學(xué)生及其選修課程的情況。select student.*,sc.*, course.* from student,sc , course where student.sno=sc.sno and o=o;17. 查詢(xún)每

8、個(gè)學(xué)生及其選修課程的情況包括沒(méi)有選修課程的學(xué)生18. 查詢(xún)選修2號(hào)課程且成績(jī)?cè)?0分以上的所有學(xué)生的學(xué)號(hào)、姓名select student.sno, student.snamefrom student,scwhere student.sno=sc.sno and o=”2and sc.grade>90;19. 查詢(xún)每個(gè)學(xué)生的學(xué)號(hào)、姓名、選修的課程名及成績(jī)。select student.sno,sname,ssex,sage,sdept,cno,gradefrom student left outjoin sco on(student.sno=sc.sno);20. 查詢(xún)與“劉晨”在同一個(gè)

9、系學(xué)習(xí)的學(xué)生。selectsno,sname,sdeptfrom studentwhere sdept in(select sdept from student where sname=”劉晨);21. 查詢(xún)選修了課程名為“信息系統(tǒng)”的學(xué)生學(xué)號(hào)和姓名select sno,sname from student where sno in(select sno from sc where cno in (select cno from course where cname=”信息系統(tǒng));22. 找出每個(gè)學(xué)生超過(guò)他選修課程平均成績(jī)的課程號(hào)。select sno,cno from sc x where

10、grade>=(select avg(grade) from sc y where y.sno=x.sno);23. 將一個(gè)新學(xué)生記錄(學(xué)號(hào):;姓名:陳冬;性別:男;所在系:is;年齡:18歲)插入到student表中。insert into student values ('','陳冬','男','is',18);24. 將學(xué)生的年齡改為22歲。update student setsage=22 where sno='';25. 將所有學(xué)生的年齡增加1歲。update student setsage=sag

11、e+1;26. 將計(jì)算機(jī)科學(xué)系全體學(xué)生的成績(jī)置零。update sc set grade=0 where exits(selete * from student where student.sno=sc.sno and sdept=” 計(jì)算機(jī)科學(xué)系”);27. 刪除學(xué)號(hào)為的學(xué)生記錄delete from student where sno=”';28. 刪除所有的學(xué)生選課記錄。delete from sc;29. 刪除2號(hào)課程的所有選課記錄。delete from sc where cno='2';30. 刪除計(jì)算機(jī)科學(xué)系所有學(xué)生的選課記錄。delete from sc

12、 where sno in (selete sno from student where sdept=” 計(jì)算機(jī)科學(xué)系”);31. 建立信息系學(xué)生的視圖。 create view is_student asselect sno,sname,sage from student where sdept='is';sql語(yǔ)句練習(xí)題2設(shè)教學(xué)數(shù)據(jù)庫(kù)education,有三個(gè)關(guān)系:  學(xué)生關(guān)系s(sno,sname,age,sex,sdept); 學(xué)習(xí)關(guān)系sc(sno,cno,grade);  課程關(guān)系c(cno,cname,cdept,tname)

13、 查詢(xún)問(wèn)題:  1:查所有年齡在20歲以下的學(xué)生姓名及年齡。select sname,sagefrom swhere sage<20;(not age>=20);2:查考試成績(jī)有不及格的學(xué)生的學(xué)號(hào)  select distinct snofrom scwhere grade<60;3:查所年齡在20至23歲之間的學(xué)生姓名、系別及年齡。select sname,sdept,sagefrom swhere sage between 20 and 23;4:查計(jì)算機(jī)系、數(shù)學(xué)系、信息系的學(xué)生姓名、性別。 select sname,ssex fr

14、om s where sdept in(cs,is,math);5:查既不是計(jì)算機(jī)系、數(shù)學(xué)系、又不是信息系的學(xué)生姓名、性別 select sname,ssex from s where sdept not in(cs,is,math);  6:查所有姓“劉”的學(xué)生的姓名、學(xué)號(hào)和性別。 select sname,sno,ssex from s where sname like劉%;7:查姓“上官”且全名為3個(gè)漢字的學(xué)生姓名。 select sname from s where sname like 上官_;8:查所有不姓“張”的學(xué)生的姓名。 se

15、lect sname,sno,ssex from s where sname not like 張%;9:查db_design課程的課程號(hào)。select cno from c where cname like db_design;10:查缺考的學(xué)生的學(xué)號(hào)和課程號(hào)。 select sno,cno from sc where grade is null;11:查年齡為空值的學(xué)生的學(xué)號(hào)和姓名。 select sno,sname from s where sage is null;12:查計(jì)算機(jī)系20歲以下的學(xué)生的學(xué)號(hào)和姓名。select sno,snamefrom swhere

16、sdept=cs and sage<20;13:查計(jì)算機(jī)系、數(shù)學(xué)系、信息系的學(xué)生姓名、性別。select sname,ssexfrom swhere sdept=cs or sdept=is or sdept=math;14:查詢(xún)選修了c3課程的學(xué)生的學(xué)號(hào)和成績(jī),其結(jié)果按分?jǐn)?shù)的降序排列。select sno,gradefrom scwhere cno=c3order by grade desc;15:查詢(xún)?nèi)w學(xué)生的情況,查詢(xún)結(jié)果按所在系升序排列,對(duì)同一系中的學(xué)生按年齡降序排列。select * from sorder by sdep,sage desc;16:查詢(xún)學(xué)生總?cè)藬?shù)。select

17、 count(*) from s;17:查詢(xún)選修了課程的學(xué)生人數(shù)。 select count(distinct sno) from sc18:計(jì)算選修了c1課程的學(xué)生平均成績(jī)。select avg(grade)from scwhere cno=c1;19:查詢(xún)學(xué)習(xí)c3課程的學(xué)生最高分?jǐn)?shù)。select max(grade)from scwhere cno=c3;20:查詢(xún)各個(gè)課程號(hào)與相應(yīng)的選課人數(shù)。select cno, count(sno)from scgroup by cno;  21:查詢(xún)計(jì)算機(jī)系選修了3門(mén)以上課程的學(xué)生的學(xué)號(hào)。select snofrom scwher

18、e sdept=csgroup by snohaving count(*)>3; 22:求基本表s中男同學(xué)的每一年齡組(超過(guò)50人)有多少人?要求查詢(xún)結(jié)果按人數(shù)升序排列,人數(shù)相同按年齡降序排列。select sage,count(sno)from swhere ssex='m'group by sagehaving count(*)>50order by 2,sage desc;23:查詢(xún)每個(gè)學(xué)生及其選修課程的情況。select s.sno, sname, sage, ssex, sdept, cno, gradefrom s, scwhere s.sno

19、=sc.sno;24:查詢(xún)選修了c2課程且成績(jī)?cè)?0分以上的所有學(xué)生。select s.sno,snamefrom s,scwhere s.sno=sc.snoand o=c2 and sc.grade>90; 25:查詢(xún)每個(gè)學(xué)生選修的課程名及其成績(jī)。select s.sno,sname,cname,sc.gradefrom s,sc,cwhere s.sno=sc.sno and o=o 26:統(tǒng)計(jì)每一年齡選修課程的學(xué)生人數(shù)。 select sage,count(distinct s.sno)from s,scwhere s.sno=sc.snogroup

20、 by sage;27:查詢(xún)選修了c2課程的學(xué)生姓名。select sname from s where sno in(select sno from sc where cno=c2);28:查詢(xún)與“張三”在同一個(gè)系學(xué)習(xí)的學(xué)生學(xué)號(hào)、姓名和系別。select sno,sname,sdept from where sdept=(select sdept from s where sname=張三); 29:查詢(xún)選修課程名為“數(shù)據(jù)庫(kù)”的學(xué)生學(xué)號(hào)和姓名。select sno,sname from s where sno in(select sno from sc where cno in (

21、select cno from c where cname=db); 30:查詢(xún)與“張三”在同一個(gè)系學(xué)習(xí)的學(xué)生學(xué)號(hào)、姓名和系別。select sno,sname,sdept from s where sdept=(select sdept from s where sname=張三); 31:查詢(xún)選修課程名為“數(shù)據(jù)庫(kù)”的學(xué)生學(xué)號(hào)和姓名。select sno,sname from s where sno in (select sno from sc where cno=(select cno from c where cname=db);32:查詢(xún)選修了c2課程的學(xué)生姓名。1

22、. select sname from s where sno in(select sno from sc where cno=c2);2. select sname from s where exists(select * from sc where sc.sno=s.sno and cno=c2); 33:查詢(xún)選修了全部課程的學(xué)生姓名。select sname from s where not exists(select * from c where not exists(select * from sc where sc.sno=s.sno and o=o);  36

23、:查詢(xún)所學(xué)課程包含學(xué)生s3所學(xué)課程的學(xué)生學(xué)號(hào) select distinct sno from sc as x where not exists(select * from sc as y where y.sno=s3 and not exists(select * from sc as z where z.sno=x.sno and o=o);sql語(yǔ)句練習(xí)題 3一、簡(jiǎn)單查詢(xún)1、列出全部學(xué)生的信息。select * from學(xué)生2、列出軟件專(zhuān)業(yè)全部學(xué)生的學(xué)號(hào)及姓名。select學(xué)號(hào),姓名from學(xué)生where專(zhuān)業(yè)="軟件"3、列出所有必修課的課號(hào)。select

24、distinct課號(hào)from必修課4、求1號(hào)課成績(jī)大于80分的學(xué)生的學(xué)號(hào)及成績(jī),并按成績(jī)由高到低列出。select學(xué)號(hào),成績(jī)from選課where課號(hào)="1"and 成績(jī)>80 order by成績(jī)desc5、列出非軟件專(zhuān)業(yè)學(xué)生的名單。方法一:select姓名from學(xué)生where專(zhuān)業(yè)<>"軟件"方法二:select姓名from學(xué)生where not專(zhuān)業(yè)="軟件"方法三:select姓名from學(xué)生where專(zhuān)業(yè)!="軟件"6、查詢(xún)成績(jī)?cè)?080分之間的學(xué)生選課得分情況方法一:select*fro

25、m選課where成績(jī)>=70and成績(jī)<=80方法二:select*from選課where成績(jī)between70and80不在此范圍內(nèi)的查詢(xún):(注意寫(xiě)出和以下語(yǔ)句等價(jià)的語(yǔ)句)select * from 選課 where成績(jī)not between70and807、列出選修1號(hào)課或3號(hào)課的全體學(xué)生的學(xué)號(hào)和成績(jī)。方法一:select學(xué)號(hào),成績(jī)from選課where課號(hào)="1"or課號(hào)="3"方法二:select學(xué)號(hào),成績(jī)from選課where課號(hào)in("1","3")相反條件查詢(xún):select學(xué)號(hào),成績(jī)fro

26、m選課where課號(hào)notin("1","3")8、列出所有98級(jí)學(xué)生的學(xué)生成績(jī)情況。select*from選課where學(xué)號(hào)like"98%"select*from選課where學(xué)號(hào)like"98_"相反條件查詢(xún):select*from選課where學(xué)號(hào)notlike"98%"9、列出成績(jī)?yōu)榭罩?或不為空值)的學(xué)生的學(xué)號(hào)和課號(hào)。答案一:select學(xué)號(hào),課號(hào)from選課where成績(jī)isnull答案二:select學(xué)號(hào),課號(hào)from選課where成績(jī)isnotnull10、求出所有學(xué)生的總成績(jī)

27、。select sum(成績(jī)) as總成績(jī) from 選課11、列出每個(gè)學(xué)生的平均成績(jī)。select學(xué)號(hào),avg(成績(jī)) as 平均成績(jī)from選課group by學(xué)號(hào)12、列出各科的平均成績(jī)、最高成績(jī)、最低成績(jī)和選課人數(shù)。select課號(hào),avg(成績(jī))as平均成績(jī),max(成績(jī))as最高分,;min(成績(jī))as最低分,count(學(xué)號(hào)) as 選課人數(shù) from 選課 group by 課號(hào)二、連接查詢(xún)(一)簡(jiǎn)單連接1、列出選修1號(hào)課的學(xué)生姓名及成績(jī)。select 姓名,成績(jī) from學(xué)生,選課 where學(xué)生.學(xué)號(hào)=選課.學(xué)號(hào) and 課號(hào)="1"2、列出選修1號(hào)課的

28、學(xué)生的學(xué)號(hào)、姓名及成績(jī)。select學(xué)生.學(xué)號(hào),姓名,成績(jī)from學(xué)生s,選課xwheres.學(xué)號(hào)=x.學(xué)號(hào)and課號(hào)="1"3、求出總分大于150的學(xué)生的學(xué)號(hào)、姓名及總成績(jī)。select學(xué)生.學(xué)號(hào),姓名,sum(成績(jī))as總成績(jī)from學(xué)生,選課;where學(xué)生.學(xué)號(hào)=選課.學(xué)號(hào)groupby選課.學(xué)號(hào)havingsum(成績(jī))>150(二)自連接查詢(xún)1、列出那些專(zhuān)業(yè)相同的學(xué)生相應(yīng)的姓名及專(zhuān)業(yè)信息。select a.姓名,b.姓名,專(zhuān)業(yè)from學(xué)生a,學(xué)生bwherea.學(xué)號(hào)<>b.學(xué)號(hào)anda.專(zhuān)業(yè)=b.專(zhuān)業(yè)2、求至少選修1號(hào)課和2號(hào)課的學(xué)生的學(xué)號(hào)。s

29、electx.學(xué)號(hào)from選課x,選課ywherex.學(xué)號(hào)=y.學(xué)號(hào)andx.課號(hào)="1"andy.課號(hào)="2"3、有以下表rate.dbf幣種1代碼c(2)、幣種2代碼c(2)、買(mǎi)入價(jià)n(8,4)、賣(mài)出價(jià)n(8,4)外匯匯率.dbf幣種1c(4)、幣種2c(4)、買(mǎi)入價(jià)n(8,4)、賣(mài)出價(jià)n(8,4)外匯代碼.dbf外匯名稱(chēng)c(10)、外匯代碼c(10)要求:將所有“外匯匯率”表中的數(shù)據(jù)插入rate表中并且順序不變,由于“外匯匯率”中的幣種1和幣種2存放的是外幣名稱(chēng),而rate表中的幣種1代碼和幣種2代碼應(yīng)該存放外幣代碼,所以插入時(shí)要做相應(yīng)的改動(dòng),外幣

30、名稱(chēng)與外向代碼的對(duì)應(yīng)關(guān)系存儲(chǔ)在“外匯代碼”表中。selecta.外幣代碼as幣種1代碼,b.外幣代碼as幣種2代碼,;買(mǎi)入價(jià),賣(mài)出價(jià)from外匯代碼a,外匯匯率,外匯代碼b;wherea.外幣名稱(chēng)=外匯匯率.幣種1andb.外幣名稱(chēng)=外匯匯率.幣種2intotablerate4、假定有“雇員”表(雇員號(hào)c(2),雇員姓名c(6),經(jīng)理號(hào)c(2),根據(jù)雇員關(guān)系列出上一級(jí)經(jīng)理及其所領(lǐng)導(dǎo)的職員清單。(教案中的例題)select"領(lǐng)導(dǎo)",s.雇員姓名,"雇員",e.雇員姓名from雇員s,雇員ewheres.雇員號(hào)=e.經(jīng)理(三)超連接1、列出選修1號(hào)課的學(xué)生姓

31、名及成績(jī)。方法一:(使用簡(jiǎn)單連接查詢(xún)格式)select姓名,成績(jī)from學(xué)生,選課where學(xué)生.學(xué)號(hào)=選課.學(xué)號(hào)and課號(hào)="1"方法二:(使用內(nèi)部連接格式)select姓名,成績(jī)from學(xué)生innerjoin選課on學(xué)生.學(xué)號(hào)=選課.學(xué)號(hào)where課號(hào)="1"方法三:內(nèi)部連接的inner短語(yǔ)可以省略。(與方法二等價(jià))select姓名,成績(jī)from學(xué)生join選課on學(xué)生.學(xué)號(hào)=選課.學(xué)號(hào)where課號(hào)="1"2、查詢(xún)訂貨管理數(shù)據(jù)庫(kù)中數(shù)據(jù)的倉(cāng)庫(kù)號(hào)、城市、供應(yīng)商名和地址信息。方法一:使用簡(jiǎn)單連接格式。select倉(cāng)庫(kù).倉(cāng)庫(kù)號(hào),城市,供

32、應(yīng)商名,地址from供應(yīng)商,訂購(gòu)單,職工,倉(cāng)庫(kù);where供應(yīng)商.供應(yīng)商號(hào)=訂購(gòu)單.供應(yīng)商號(hào)and訂購(gòu)單.職工號(hào)=職工.職工號(hào);and職工.倉(cāng)庫(kù)號(hào)=倉(cāng)庫(kù).倉(cāng)庫(kù)號(hào)方法二:使用超連接的內(nèi)部連接格式。(注意連接條件的順序)select倉(cāng)庫(kù).倉(cāng)庫(kù)號(hào),城市,供應(yīng)商名,地址from供應(yīng)商join訂購(gòu)單join職工join倉(cāng)庫(kù);on職工.倉(cāng)庫(kù)號(hào)=倉(cāng)庫(kù).倉(cāng)庫(kù)號(hào)on訂購(gòu)單.職工號(hào)=職工.職工號(hào)on供應(yīng)商.供應(yīng)商號(hào)=訂購(gòu)單.供應(yīng)商號(hào)3、查詢(xún)沒(méi)有選修任何課程的學(xué)生姓名。方法一:使用嵌套查詢(xún)select姓名from學(xué)生where學(xué)號(hào)notin(select學(xué)號(hào)from選課)方法二:使用超連接的右連接。select姓名

33、from選課rightjoin學(xué)生on選課.學(xué)號(hào)=學(xué)生.學(xué)號(hào)where選課.學(xué)號(hào)<>學(xué)生.學(xué)號(hào)方法三:使用超連接的左連接。(注意表名順序和方法二的不同)select姓名from學(xué)生leftjoin選課on選課.學(xué)號(hào)=學(xué)生.學(xué)號(hào)where選課.學(xué)號(hào)<>學(xué)生.學(xué)號(hào)三、嵌套查詢(xún)(一)普通嵌套與謂詞exists1、列出選修匯編語(yǔ)言課的學(xué)生的學(xué)號(hào)。方法一:select學(xué)號(hào)from選課where課號(hào)=(select課號(hào)from課程where課名="匯編語(yǔ)言")方法二:使用謂詞exists。注意和方法一格式上的不同。select學(xué)號(hào)from選課whereexist

34、(select*from課程;where課名="匯編語(yǔ)言"and選課.課號(hào)=課程.課號(hào))2、求軟件專(zhuān)業(yè)所有必修課的課程信息。方法一:select*from課程where課號(hào)in;(select課號(hào)from必修課where必修專(zhuān)業(yè)="軟件")方法二:select*from課程whereexist(select*from必修課where必修專(zhuān)業(yè)="軟件"and課程.課號(hào)=必修課.課號(hào))(二)量詞any、some、all1、求選修2號(hào)課的學(xué)生中,成績(jī)比選修1號(hào)課的最低成績(jī)要高的學(xué)生的學(xué)號(hào)和成績(jī)。方法一:select學(xué)號(hào),成績(jī)from選課wh

35、ere課號(hào)="2"and成績(jī)>(selectmin(成績(jī))from選課where課號(hào)="1")方法二:any等價(jià)于some,所以可將any換成some。select學(xué)號(hào),成績(jī)from選課where課號(hào)="2"and成績(jī)>any;(select成績(jī)from選課where課號(hào)="1")2、求選修2號(hào)課的學(xué)生中,成績(jī)比選修1號(hào)課的任何學(xué)生的成績(jī)都要高的那些學(xué)生的學(xué)號(hào)和成績(jī)。方法一:select學(xué)號(hào),成績(jī)from選課where課號(hào)="2"and成績(jī)>(selectmax(成績(jī))from

36、選課where課號(hào)="1")方法二:select學(xué)號(hào),成績(jī)from選課where課號(hào)="2"and成績(jī)>all;(select成績(jī)from選課where課號(hào)="1")(三)內(nèi)外層互相關(guān)嵌套(外層依賴(lài)于內(nèi)層的查詢(xún)結(jié)果,內(nèi)層依賴(lài)于外層來(lái)進(jìn)一步查詢(xún))1、列出每門(mén)課程中成績(jī)最高的選課信息。select*from選課awhere成績(jī)=(selectmax(成績(jī))from選課bwherea.課號(hào)=b.課號(hào))2、列出每個(gè)學(xué)生中成績(jī)低于本人平均成績(jī)的選課信息。select*from選課awhere成績(jī)<(selectavg(成績(jī))from

37、選課bwherea.學(xué)號(hào)=b.學(xué)號(hào))3、列出表“訂購(gòu)單2.dbf”(其內(nèi)容就是在訂購(gòu)單表的基礎(chǔ)上增加一個(gè)總金額字段)中每個(gè)職工經(jīng)手的具有最高總金額的訂購(gòu)單信息。(教案中例題)selectout.職工號(hào),out.供應(yīng)商號(hào),out.訂貨單號(hào),out.訂貨日期,out.總金額;from訂購(gòu)單outwhere總金額=(selectmax(總金額)from訂購(gòu)單inner1;whereout.職工號(hào)=inner1.職工號(hào))四、操作功能1、在課程表中插入新的元組(5,大學(xué)英語(yǔ))。insertinto課程(課號(hào),課名)values("5","大學(xué)英語(yǔ)")2、給學(xué)生表中男生的記錄加上刪除標(biāo)記。deletefrom學(xué)生where性別="男"3、將

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論