当前位置:网站首页>[exercise 5] [Database Principle]
[exercise 5] [Database Principle]
2022-07-03 12:51:00 【Laughing cold faced ghost】
List of articles
One . Single topic selection
1. stay SQL Of SELECT In the sentence , What can realize projection operation is ( ).
A. SELECT
B. FROM
C. WHERE
D. GROUP BY
right key : A
2.SQL Set data query 、 Data manipulation 、 Data definition and data control function are integrated , sentence ALTER TABLE Which of the following functions ( ).
A. Data query
B. Data manipulation
C. Data definition
D. Data control
right key : C
3. The following SQL In the sentence ,( ) Not data manipulation statements .
A. INSERT
B. CREATE
C. DELETE
D. UPDATE
right key : B
4.SQL in , The following operations involving null values , What's not right is ( ).
A. AGE IS NULL
B. AGE IS NOT NULL
C. AGE = NULL
D. NOT (AGE IS NULL)
right key : C
5. If you use the following SQL Statement creates a table S:
CREATE TABLE S
(SNo CHAR (6) NOT NULL,SName CHAR(8) NOT NULL,SEX CHAR(2),AGE INTEGER)
Now S When inserting a table, such as the following line , Which line can be inserted ( )?
A. (‘991001’ , ‘ Li Mingfang ’, Woman , ‘23’)
B. (‘990746’, ‘ Zhang Wei ’, NULL, NULL)
C. (NULL, ‘ Chen Daoyi ’, ‘ male ’, 32)
D. (‘992345’, NULL, ‘ Woman ’, 25)
right key : B
6. Suppose the student relationship is S(SNo,SName,Sex,Age), The curriculum relationship is C(CNo,CName,Teacher), What is the relationship between students' course selection SC(SNo,CNo,Grade). To find “ database ” Curriculum “ male ” The student's name , The relationship to be involved is ( ).
A. S
B. SC,C
C. S,SC
D. S,C,SC
right key : D
7. stay SQL in , The command to modify the data table structure is ( ).
A. ALTER
B. CREATE
C. CHANGE
D. DELETE
right key : A
8. Known students 、 The three relationships between courses and grades are as follows : Student ( Student number , full name , Gender , class )、 Course ( Course name , Class hours , nature )、 achievement ( Course name , Student number , fraction ). If you print student transcript , Including student ID 、 full name 、 Course name and score , These relationships should be ( ) operation .
A. and
B. hand over
C. The product of
D. Connect
right key : D
Two . Short answer
1. Set up teaching database school There are the following relational patterns in , Use them separately SQL Complete the following questions .
student( Student number , full name , Gender , Date of birth , Class number )
course( Course no. , Course name , The teacher )
score( Student number , Course no. , fraction )
(1) Inquire about student Names of all records in the table 、 Gender and class number column .
(2) In ascending order of course number , The scores are displayed in descending order score All the records of the table .
(3) Check the names of all students 、 Course number and score column .
right key :
(1) Inquire about student Names of all records in the table 、 Gender and class number column .
SELECT full name , Gender , Class number FROM student
(2) In ascending order of course number , The scores are displayed in descending order score All the records of the table .
SELECT * FROM score ORDER BY Course no. ASC, fraction DESC
(3) Check the names of all students 、 Course number and score column .
SELECT student. full name ,score. Course no. ,score. fraction FROM student,score
WHERE student. Student number =score. Student number
边栏推荐
- It feels great to know you learned something, isn‘t it?
- 公纵号发送提示信息(用户微服务--消息微服务)
- Xctf mobile--rememberother problem solving
- The best shortcut is no shortcut
- 基于同步坐标变换的谐波电流检测
- [comprehensive question] [Database Principle]
- How to stand out quickly when you are new to the workplace?
- (latest version) WiFi distribution multi format + installation framework
- 最新版盲盒商城thinkphp+uniapp
- Summary of error prone knowledge points: Calculation of define s (x) 3*x*x+1.
猜你喜欢
Record your vulnhub breakthrough record
Use bloc to build a page instance of shutter
(最新版) Wifi分销多开版+安装框架
4. 无线体内纳米网:电磁传播模型和传感器部署要点
[review questions of database principles]
剑指Offer07. 重建二叉树
[ArcGIS user defined script tool] vector file generates expanded rectangular face elements
The latest version of blind box mall thinkphp+uniapp
idea将web项目打包成war包并部署到服务器上运行
GaN图腾柱无桥 Boost PFC(单相)七-PFC占空比前馈
随机推荐
(最新版) Wifi分销多开版+安装框架
Airflow installation jump pit
Differences and connections between final and static
Project video based on Linu development
强大的头像制作神器微信小程序
The latest version of blind box mall thinkphp+uniapp
Apache Mina Development Manual
[problem exploration and solution of one or more filters or listeners failing to start]
写一个简单的nodejs脚本
alright alright alright
CNN MNIST handwriting recognition
记录自己vulnhub闯关记录
Sword finger offer10- I. Fibonacci sequence
Sword finger offer07 Rebuild binary tree
剑指Offer04. 二维数组中的查找【中等】
Sword finger offer05 Replace spaces
【计网】第三章 数据链路层(2)流量控制与可靠传输、停止等待协议、后退N帧协议(GBN)、选择重传协议(SR)
node的ORM使用-Sequelize
What is more elegant for flutter to log out and confirm again?
Nodejs+Express+MySQL实现登陆功能(含验证码)