当前位置:网站首页>[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
边栏推荐
- 社交社区论坛APP超高颜值UI界面
- [review questions of database principles]
- Ali & ant self developed IDE
- 剑指Offer05. 替换空格
- Alibaba is bigger than sending SMS (user microservice - message microservice)
- 低代码平台国际化多语言(i18n)技术方案
- Enter the length of three sides of the triangle through the user, and calculate the area of the triangle, where the length is a real number
- 十條職場規則
- The upward and downward transformation of polymorphism
- Idea packages the web project into a war package and deploys it to the server to run
猜你喜欢

Four problems and isolation level of MySQL concurrency

Grid connection - Analysis of low voltage ride through and island coexistence

Eureka self protection

剑指Offer06. 从尾到头打印链表

记录自己vulnhub闯关记录

Analysis of a music player Login Protocol

并网-低电压穿越与孤岛并存分析

强大的头像制作神器微信小程序

ncnn神经网络计算框架在香橙派OrangePi 3 LTS开发板中的使用介绍

【ManageEngine】IP地址扫描的作用
随机推荐
最新版抽奖盲盒运营版
基于Linu开发的项目视频
The foreground uses RSA asymmetric security to encrypt user information
Day 1 of kotlin learning: simple built-in types of kotlin
Leetcode234 palindrome linked list
公纵号发送提示信息(用户微服务--消息微服务)
T430 toss and install OS majave 10.14
Enter the length of three sides of the triangle through the user, and calculate the area of the triangle, where the length is a real number
Redhat5 installing socket5 proxy server
Is it safe to open an account for online stock speculation? Who can answer
What is more elegant for flutter to log out and confirm again?
剑指Offer09. 用两个栈实现队列
OpenStack节点地址改变
强大的头像制作神器微信小程序
studio All flavors must now belong to a named flavor dimension. Learn more
[judgment question] [short answer question] [Database Principle]
CNN MNIST handwriting recognition
Is it OK to open an account for online stock speculation? Is the fund safe?
【习题七】【数据库原理】
The latest version of blind box mall thinkphp+uniapp