当前位置:网站首页>[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
边栏推荐
- 01 three solutions to knapsack problem (greedy dynamic programming branch gauge)
- 自抗扰控制器七-二阶 LADRC-PLL 结构设计
- Comprehensive evaluation of double chain notes · Siyuan notes: advantages, disadvantages and evaluation
- LeetCode 0556. Next bigger element III - end of step 4
- 【ArcGIS自定义脚本工具】矢量文件生成扩大矩形面要素
- [ManageEngine] the role of IP address scanning
- [ArcGIS user defined script tool] vector file generates expanded rectangular face elements
- Quickly learn member inner classes and local inner classes
- 剑指Offer04. 二维数组中的查找【中等】
- 强大的头像制作神器微信小程序
猜你喜欢
随机推荐
The upward and downward transformation of polymorphism
GCN thinking - word2vec directly calculates text classification
Cache penetration and bloom filter
4. Wireless in vivo nano network: electromagnetic propagation model and key points of sensor deployment
Quickly learn member inner classes and local inner classes
[exercise 6] [Database Principle]
Sword finger offer06 Print linked list from end to end
ncnn神经网络计算框架在香橙派OrangePi 3 LTS开发板中的使用介绍
Node. Js: use of express + MySQL
最新版抽奖盲盒运营版
node的ORM使用-Sequelize
剑指Offer04. 二维数组中的查找【中等】
【习题五】【数据库原理】
Express abstract classes and methods
Xctf mobile--app2 problem solving
电压环对 PFC 系统性能影响分析
【数据库原理复习题】
[problem exploration and solution of one or more filters or listeners failing to start]
如何在微信小程序中获取用户位置?
Solve the problem of VI opening files with ^m at the end









