全球旧事资料 分类
10级《数据库系统》上机作业02单号r
要求:实现对关系数据库product中相关数据的简单查询操作。r
productmakermodeltyper
PCmodelspeedramhdrdpricer
Laptopmodelspeedramhdscree
pricer
Pri
termodelcolortypepricer
r
实验4:SQL的简单查询r
a找出所有价格低于1000的PC型号、速度和硬盘大小r
selectmodelspeedhdr
frompcr
whereprice1000r
r
b要求同(a),但要将列speed重命名为gigahertz,并将列hd重命名为gigabytesr
selectmodelspeedasgigahertzhdasgigabytesr
frompcr
whereprice1000r
r
c找出所有打印机制造厂商。r
selectmakerr
fromproductr
wheretypepri
terr
r
d找出价格高于1500的笔记本电脑的型号、内存大小和屏幕尺寸r
selectmodelramscree
r
fromlaptopr
whereprice1500r
r
e找出关系Pri
ter中所有彩色打印机元组。注意属性color是一个布尔类型。r
selectr
frompri
terr
wherecolortruer
r
f找出速度为32且价格低于2000的PC的型号和硬盘尺寸。r
selectmodelhdr
frompcr
wherespeed32a
dprice2000r
r
10级《数据库系统》上机作业02双号r
要求:实现对关系数据库ship中相关数据的简单查询操作。r
Classesclasstypecou
try
umGu
sboredisplaceme
tr
Ships
ameclasslau
chedr
Battle
amedater
Outcomesshipbattleresultr
r
实验4:SQL的简单查询r
a找出至少有10门炮的军舰类别名和制造国家。r
selectclasscou
tryr
fromclassesr
where
umgu
s10r
r
b找出在1918年以前下水的舰船的名字,并且把结果列名改为ShipNamer
select
amer
fromshipsr
wherelau
ched1918r
r
c找出所有在战斗中被击沉的船只和那次战斗的名字r
selectbattler
fromoutcomesr
whereresultsu
kr
r
d找出所有和它的类别名同名字的船只r
select
amer
fromshipsr
where
ameclassr
r
e找出所有以“R”字符打头的船只的名字。r
select
amer
fromshipsr
where
amelikeRr
r
f找出所有包括三个或三个以上单词的船只名字(如Ki
gGeorgeV)r
select
amer
fromshipsr
where
amelikeAZazAZazAZr
r
10级《数据库系统》上机作业03单号r
要求:实现对关系数据库product中相关数据的连接查询操作。r
productmakermodeltyper
PCmodelspeedramhdrdpricer
Laptopmodelspeedramhdscree
pricer
Pri
termodelcolortypepricer
r
实验5:SQL的连接查询r
a查询硬盘容量至少30GB的笔记本电脑制造商及该电脑的速度。r
selectmakerspeedr
fromproductlaptopr
whereproductmodellaptopmodelr
a
dhd30r
r
selectmakerspeedr
fromproducti
erjoi
laptopo
productmodellaptopmodelr
wherehd30r
r
b查询制造商B生产的任意类型的所有产品的型号和价格。r
selectproductmodelpricefromproductpcwhereproductmodelpcmodela
dmakerBr
u
r
好听全球资料 返回顶部