当前位置:网站首页>[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
边栏推荐
- context. Getexternalfilesdir() is compared with the returned path
- The latest version of lottery blind box operation version
- OpenStack节点地址改变
- ORM use of node -serialize
- Seven second order ladrc-pll structure design of active disturbance rejection controller
- Sword finger offer03 Repeated numbers in the array [simple]
- The best shortcut is no shortcut
- Cache penetration and bloom filter
- node的ORM使用-Sequelize
- studio All flavors must now belong to a named flavor dimension. Learn more
猜你喜欢
Method overloading and rewriting
Application of ncnn Neural Network Computing Framework in Orange Pi 3 Lts Development Board
最新版抽奖盲盒运营版
Xctf mobile--app1 problem solving
Xctf mobile--app3 problem solving
Four problems and isolation level of MySQL concurrency
(latest version) WiFi distribution multi format + installation framework
The latest version of lottery blind box operation version
Social community forum app ultra-high appearance UI interface
Application of ncnn neural network computing framework in orange school orangepi 3 lts development board
随机推荐
4. 无线体内纳米网:电磁传播模型和传感器部署要点
启用MemCached的SASL认证
Approve iPad, which wants to use your icloud account
Day 1 of kotlin learning: simple built-in types of kotlin
T430 toss and install OS majave 10.14
Xctf mobile--app1 problem solving
Do you feel like you've learned something and forgotten it?
Leetcode234 palindrome linked list
十条职场规则
Sword finger offer09 Implementing queues with two stacks
Glide question you cannot start a load for a destroyed activity
如何在微信小程序中获取用户位置?
node的ORM使用-Sequelize
Xctf mobile--app2 problem solving
[comprehensive question] [Database Principle]
Powerful avatar making artifact wechat applet
Sword finger offer05 Replace spaces
Low code platform international multilingual (I18N) technical solution
[problem exploration and solution of one or more filters or listeners failing to start]
Analysis of a music player Login Protocol