当前位置:考试网  > 试卷库  > 计算机类  > 等级考试  > 计算机二级  > MySQL数据库程序设计  > 学生表:Student学生表(学号,姓名,性别,年龄,组织部门) Course课程表(编号,课程名称) Sc选课表(学号,课程编号,成绩) 表结构如下: (1).写一个SQL语句,查询选修了’计算机原理’的学生学号和姓名 (2).写一个SQL语句,查询’周星驰’同学选修了的课程名字 (3).写一个SQL语句,查询选修了5门课程的学生学号和姓名
试题预览

学生表:Student学生表(学号,姓名,性别,年龄,组织部门)

Course课程表(编号,课程名称)

Sc选课表(学号,课程编号,成绩)

表结构如下:

(1).写一个SQL语句,查询选修了’计算机原理’的学生学号和姓名

(2).写一个SQL语句,查询’周星驰’同学选修了的课程名字

(3).写一个SQL语句,查询选修了5门课程的学生学号和姓名

查看答案
收藏
纠错
正确答案:

(1)

select sno,sname

from student

where sno in (

select sno

from sc

where cno = (

select cno

from course

where cname= 计算机原理

)

)

(2)

select cname

from course

where cno in (

select cno

from sc

where sno =

(

select sno

from student

where sname= 周星驰

)

)

(3)

select sno,sname

From student

Where sno in (

select sno

from scgroup by sno having count(sno)=5

)

答案解析:

暂无解析

你可能感兴趣的试题

在汉字形体构造的基本理论中,象形、指事、会意、形声称为“四体”。

社区教育的实质是()

文化传统是教育的________和________。

现代汉语中名词不能做谓语。

婴儿说出的句子像发电报式的电报句的年龄阶段处于()

热门试题 更多>
试题分类: 水利
练习次数:0次
试题分类: 软件测试工程师
练习次数:0次
试题分类: 网络管理员
练习次数:1次
Thefoodweeatseemstohaveprofoundeffectsonourhealth.Althoughsciencehasmadeenormousstepsinmakingfoodmorefittoeat,ithas,atthesametime,mademanyfoodsunfittoeat.Someresearchhasshownthatperhapseightypercentofcancerisrelatedtothedietaswell,especiallycancerthecolon.Differentculturesaremorepronetocontractcertainillnessesbecauseofthefoodthatischaracteristicinthesecultures.Thatfoodrelatedtollnessisnotanewdiscovery.In1945,governmentresearchersrealizedthatitratesandnitrites,commonlyusedtopreservecolorinmeats,andotherfooddditives,causedcancer.Yet,thesecarcinogenicadditivesremaininourfood,nditbecomesmoredifficultallthetimetoknowwhichthingsonthepackginglabelsofprocessedfoodarehelpfulorharmful.Theadditiveswhichweeatarenotallsodirect.Farmersoftengivepenicillintobeefandpoultry,andbecauseofthis,penicillinhasbeenfoundinthemilkoftreatedcows.Sometimessimilardrugsareadministeredtoanimalsnotformedicinalpurposes,butforfinancialreasons.Thefarmersaresimplytryingtofattentheanimalsinordertoobtainahigherpriceonthemarket.AlthoughtheFoodandDrugAdministration(FDA)hastriedrepeatedlytocontroltheseprocedures,thepracticescontinue. 48.Whatisthemaintopicofthepassage? A.Foodandourhealth BFoodandadditives C.Foodandcancer DFoodandculture 49AllofthefollowingstatementsaretrueEXCEPT_______. AFortypercentofcanceriscausedbyproblemsrelatedtofood. BResearchershaveknownaboutthepotentialdangeroffoodadditivesformanyyears C.Weeatsomeofthefoodadditivesdirectlyandsomeindirectly DDrugsarealwaysgiventoanimalsformedicinalpurposes 50.Whydofarmersgivedrugstotheiranimals? A.tospeedupthegrowthofanimals BTomaketheanimalsfatter Ctomaketheanimals’meatfittoeat DTomaketheanimals’meatrichinnutrients 51.Itcanbeinferredfromthepassagethat_________. Ascientisthavemadeallthefoodfittoeat Bonlyinrecentyearshavepeoplefoundthatthefoodisrelatedtoone’sillness Callkindsofcancerarerelatedtothediet Dsomeadditivesareharmfultoourhealth 52.Theword“this”inthesecondsentenceofparagraph2mostprobablyrefersto__________. Afarmer Bpenicillin Cbeefandpoultry Dthefactthatfarmersoftengivepenicillintoabeef
试题分类: 英语B级
练习次数:0次
试题分类: 电气
练习次数:0次
试题分类: 网络管理员
练习次数:0次
扫一扫,手机做题